feat: auth success and error messaging

This commit is contained in:
BLoC
2025-03-10 14:38:26 +03:00
parent 91c907bc57
commit 8cca27cd76
3 changed files with 133 additions and 117 deletions

View File

@@ -1,4 +1,5 @@
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
const int _toastDuration = 2;
@@ -19,10 +20,10 @@ void showErrorToast(String message) {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_LONG,
gravity: ToastGravity.TOP,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: _toastDuration,
backgroundColor: appTheme.whiteA700,
textColor: appTheme.gray,
backgroundColor: appTheme.red,
textColor: Colors.white,
fontSize: 16.0,
);
}
@@ -31,7 +32,7 @@ void showSuccessToast(String message) {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.TOP,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: _toastDuration,
backgroundColor: appTheme.greenA70001,
textColor: appTheme.whiteA700,