From 5ae288a3f6dfc2696bb34e9825c8a9665195585c Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 9 Feb 2020 16:05:08 +0100 Subject: [PATCH] Remove Flushbar With a FAB, flushbar's snackbar is just too difficult to press. We're reverting to the classic Scaffold and making sure we're calling it with the correct context. https://github.com/AndreHaueisen/flushbar/issues/64 --- lib/utils.dart | 8 ++------ pubspec.lock | 7 ------- pubspec.yaml | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/utils.dart b/lib/utils.dart index e9492030..46823555 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -2,8 +2,6 @@ import 'package:fimber/fimber.dart'; import 'package:flutter/material.dart'; import 'package:package_info/package_info.dart'; -import 'package:flushbar/flushbar.dart'; - import 'app.dart'; import 'core/note.dart'; import 'state_container.dart'; @@ -38,8 +36,6 @@ SnackBar buildUndoDeleteSnackbar(BuildContext context, Note deletedNote) { } void showSnackbar(BuildContext context, String message) { - Flushbar( - message: message, - duration: const Duration(seconds: 3), - ).show(context); + var snackBar = SnackBar(content: Text(message)); + Scaffold.of(context).showSnackBar(snackBar); } diff --git a/pubspec.lock b/pubspec.lock index 95041daf..0bf5612f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -155,13 +155,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.0.9" - flushbar: - dependency: "direct main" - description: - name: flushbar - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.1" flutter: dependency: "direct main" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 9d1786b5..210d567f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,6 @@ dependencies: auto_size_text: ^2.0.1 fimber: ^0.3.0 dynamic_theme: ^1.0.0 - flushbar: ^1.9.0 flutter_staggered_grid_view: ^0.3.0 page_transition: "^1.1.5" provider: ^3.2.0