mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-24 06:48:38 +02:00
Gracefully handle toast messages error on desktop platforms
This commit is contained in:
@@ -81,14 +81,16 @@ class LinkViewModel {
|
||||
}
|
||||
|
||||
Future<void> _errorToast(String message, {double fontSize = 16}) async {
|
||||
Fluttertoast.showToast(
|
||||
msg: message,
|
||||
toastLength: Toast.LENGTH_LONG,
|
||||
gravity: ToastGravity.SNACKBAR,
|
||||
backgroundColor: Colors.black,
|
||||
textColor: Colors.white,
|
||||
fontSize: fontSize,
|
||||
);
|
||||
try {
|
||||
await Fluttertoast.showToast(
|
||||
msg: message,
|
||||
toastLength: Toast.LENGTH_LONG,
|
||||
gravity: ToastGravity.SNACKBAR,
|
||||
backgroundColor: Colors.black,
|
||||
textColor: Colors.white,
|
||||
fontSize: fontSize,
|
||||
);
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
Future<void> handleLink() async {
|
||||
|
||||
Reference in New Issue
Block a user