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:
Vishesh Handa
2019-10-09 00:22:17 +02:00
parent 7f557d3d3e
commit df96467353
3 changed files with 3 additions and 3 deletions

View File

@ -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);
},
),