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:provider/provider.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
|
||||
import 'shared_preferences_provider.dart';
|
||||
|
||||
@ -60,10 +61,12 @@ class StatusPageState extends State<StatusPage> {
|
||||
channel.sink.add(message);
|
||||
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
'Status "${newStatus.isEmpty ? 'cleared' : newStatus}" sent!')),
|
||||
Fluttertoast.showToast(
|
||||
msg: 'Status "${newStatus.isEmpty ? 'cleared' : newStatus}" sent!',
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
backgroundColor: Colors.black,
|
||||
textColor: Colors.white,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ dependencies:
|
||||
shared_preferences: ^2.0.9
|
||||
image_picker: ^1.1.2
|
||||
uuid: ^4.4.2
|
||||
fluttertoast: ^8.0.9
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
|
Loading…
Reference in New Issue
Block a user