Fix exceptions

Minor problems because of the null safety migration
This commit is contained in:
Vishesh Handa
2021-05-25 11:04:47 +02:00
parent c0a42aab54
commit 94f8307315
4 changed files with 8 additions and 8 deletions

View File

@ -194,8 +194,8 @@ class ChecklistEditorState extends State<ChecklistEditor>
),
onUndoSelected: _undo,
onRedoSelected: _redo,
undoAllowed: null,
redoAllowed: null,
undoAllowed: false,
redoAllowed: false,
);
}

View File

@ -116,8 +116,8 @@ class JournalEditorState extends State<JournalEditor>
body: editor,
onUndoSelected: _undo,
onRedoSelected: _redo,
undoAllowed: null,
redoAllowed: null,
undoAllowed: false,
redoAllowed: false,
);
}

View File

@ -138,8 +138,8 @@ class MarkdownEditorState extends State<MarkdownEditor>
body: editor,
onUndoSelected: _undo,
onRedoSelected: _redo,
undoAllowed: null,
redoAllowed: null,
undoAllowed: false,
redoAllowed: false,
extraBottomWidget: markdownToolbar,
);
}

View File

@ -61,6 +61,8 @@ class _EditorScaffoldState extends State<EditorScaffold> {
void initState() {
super.initState();
note = widget.editorState.getNote();
SchedulerBinding.instance!
.addPostFrameCallback((_) => _initStateWithContext());
}
@ -86,8 +88,6 @@ class _EditorScaffoldState extends State<EditorScaffold> {
if (widget.editMode) {
editingMode = true;
}
note = widget.editorState.getNote();
});
}