23 lines
577 B
Dart
23 lines
577 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
class ToastUtil {
|
|
static void showToast({
|
|
required String message,
|
|
ToastGravity gravity = ToastGravity.BOTTOM,
|
|
Toast toastLength = Toast.LENGTH_SHORT,
|
|
Color backgroundColor = Colors.black,
|
|
Color textColor = Colors.white,
|
|
double fontSize = 16,
|
|
}) {
|
|
Fluttertoast.showToast(
|
|
msg: message,
|
|
toastLength: toastLength,
|
|
gravity: gravity,
|
|
backgroundColor: backgroundColor,
|
|
textColor: textColor,
|
|
fontSize: fontSize,
|
|
);
|
|
}
|
|
}
|