Combine showSnackbar code

It's annoying to always have to remember to call it. We had forgotten in
one place and that resulted in a lot of noise.
This commit is contained in:
Vishesh Handa
2020-01-27 19:02:44 +01:00
parent bd0819c5be
commit a759ad4a23
3 changed files with 4 additions and 15 deletions

View File

@ -9,6 +9,7 @@ import 'package:gitjournal/appstate.dart';
import 'package:gitjournal/core/note.dart';
import 'package:gitjournal/core/notes_folder.dart';
import 'package:gitjournal/core/git_repo.dart';
import 'package:gitjournal/utils.dart';
import 'package:path/path.dart' as p;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_crashlytics/flutter_crashlytics.dart';
@ -111,7 +112,7 @@ class StateContainerState extends State<StateContainer> {
if (shouldLogGitException(e)) {
await FlutterCrashlytics().logException(e, stacktrace);
}
rethrow;
showSnackbar(context, e.cause);
}
await _loadNotes();
}