Skip to content

Commit db1f1e8

Browse files
committed
toast fix
1 parent 998a148 commit db1f1e8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/services/ToastHelper.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ enum ToastSeverity{
66
Ok, NotOk
77
}
88
class ToastHelper {
9-
static void Show(BuildContext context, String value, {ToastSeverity severity = ToastSeverity.Ok}) {
9+
static Future<void> Show(BuildContext context, String value, {ToastSeverity severity = ToastSeverity.Ok}) async {
1010

1111
Color color = ThemeConfig.seed1;
1212
var hexCode = '#${color.value.toRadixString(16).substring(2, 8)}';
@@ -16,6 +16,6 @@ class ToastHelper {
1616
color = Colors.red;
1717
webColor = "#d8392b";
1818
}
19-
Fluttertoast.showToast(msg: value, timeInSecForIosWeb: 3, webBgColor: webColor, backgroundColor: color, webPosition: "left");
19+
await Fluttertoast.showToast(msg: value, timeInSecForIosWeb: 3, webBgColor: webColor, backgroundColor: color, webPosition: "left");
2020
}
2121
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies:
3333
flutter:
3434
sdk: flutter
3535
flutter_svg: ^2.0.17
36-
fluttertoast: ^8.2.10
36+
fluttertoast: 8.2.2
3737

3838
# The following adds the Cupertino Icons font to your application.
3939
# Use with the CupertinoIcons class for iOS style icons.

0 commit comments

Comments
 (0)