mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-19 21:31:33 +08:00
UndoSnackbar: Pass the StateContainer down
Not sure why fetching the StateContainer from the context seems to be failing and throwing an exception.
This commit is contained in:
@ -44,6 +44,7 @@ Future<String> dumpAppLogs() async {
|
||||
|
||||
void showUndoDeleteSnackbar(
|
||||
BuildContext context,
|
||||
StateContainerState stateContainer,
|
||||
Note deletedNote,
|
||||
int deletedNoteIndex,
|
||||
) {
|
||||
@ -59,7 +60,6 @@ void showUndoDeleteSnackbar(
|
||||
),
|
||||
onPressed: () {
|
||||
Fimber.d("Undoing delete");
|
||||
var stateContainer = StateContainer.of(context);
|
||||
stateContainer.undoRemoveNote(deletedNote, deletedNoteIndex);
|
||||
},
|
||||
),
|
||||
|
Reference in New Issue
Block a user