Added hiding to prevent stacking snackbars
This commit is contained in:
@@ -295,6 +295,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
|
|||||||
/// [message] - The message to display in the snackbar.
|
/// [message] - The message to display in the snackbar.
|
||||||
void showSnackBarMessage(String message) {
|
void showSnackBarMessage(String message) {
|
||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
backgroundColor: CustomTheme.boxColor,
|
backgroundColor: CustomTheme.boxColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user