You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ToastService {
/// Displays a toast notification with the given [text].
///
/// The [backgroundColor] parameter is optional and determines the background color of the toast.
/// If [backgroundColor] is not provided, the default color will be used.
///
/// This method uses the Fluttertoast package to show the toast at the bottom of the screen
/// with a long duration.
static Future<void> showToast({
required String text,
ToastType? backgroundColor,
ToastGravity? gravity = ToastGravity.BOTTOM,
Toast? toastLength = Toast.LENGTH_LONG,
}) async {
await Fluttertoast.showToast(
msg: text,
toastLength: toastLength,
gravity: gravity,
backgroundColor: backgroundColor?.color,
);
}
}
I'am giving Toast.LENGTH_LONG but toast messages stays for only 2 seconds.
The text was updated successfully, but these errors were encountered:
I'am giving Toast.LENGTH_LONG but toast messages stays for only 2 seconds.
The text was updated successfully, but these errors were encountered: