Switched from SnackBar to Toast messages
All checks were successful
Build Flutter Web and Docker Image for Local Registry / Build Flutter Web App (push) Successful in 3m11s
All checks were successful
Build Flutter Web and Docker Image for Local Registry / Build Flutter Web App (push) Successful in 3m11s
This commit is contained in:
parent
f20a257102
commit
280b963641
@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||||
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
|
||||||
import 'shared_preferences_provider.dart';
|
import 'shared_preferences_provider.dart';
|
||||||
|
|
||||||
@ -60,10 +61,12 @@ class StatusPageState extends State<StatusPage> {
|
|||||||
channel.sink.add(message);
|
channel.sink.add(message);
|
||||||
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
Fluttertoast.showToast(
|
||||||
SnackBar(
|
msg: 'Status "${newStatus.isEmpty ? 'cleared' : newStatus}" sent!',
|
||||||
content: Text(
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
'Status "${newStatus.isEmpty ? 'cleared' : newStatus}" sent!')),
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
textColor: Colors.white,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ dependencies:
|
|||||||
shared_preferences: ^2.0.9
|
shared_preferences: ^2.0.9
|
||||||
image_picker: ^1.1.2
|
image_picker: ^1.1.2
|
||||||
uuid: ^4.4.2
|
uuid: ^4.4.2
|
||||||
|
fluttertoast: ^8.0.9
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
|
Loading…
Reference in New Issue
Block a user