mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 01:02:14 +08:00
Fix exceptions
Minor problems because of the null safety migration
This commit is contained in:
@ -194,8 +194,8 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
||||
),
|
||||
onUndoSelected: _undo,
|
||||
onRedoSelected: _redo,
|
||||
undoAllowed: null,
|
||||
redoAllowed: null,
|
||||
undoAllowed: false,
|
||||
redoAllowed: false,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -116,8 +116,8 @@ class JournalEditorState extends State<JournalEditor>
|
||||
body: editor,
|
||||
onUndoSelected: _undo,
|
||||
onRedoSelected: _redo,
|
||||
undoAllowed: null,
|
||||
redoAllowed: null,
|
||||
undoAllowed: false,
|
||||
redoAllowed: false,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user