show static method
void
show(
- String msg,
- BuildContext context, {
- Duration? duration = const Duration(seconds: 1),
- FlutterToastPosition position = FlutterToastPosition.bottom,
- Color backgroundColor = const Color(0xAA000000),
- dynamic textStyle = const TextStyle(fontSize: 15, color: Colors.white),
- double backgroundRadius = 20,
- Border? border,
a fixed value for toast message position method to show the toast message
Implementation
static void show(
String msg,
BuildContext context, {
Duration? duration = const Duration(seconds: 1),
/// duration : how long do you want to show the message
FlutterToastPosition position = FlutterToastPosition.bottom,
/// position : where do you want to show the toast message, you can pass bottom, center, top or any defined value
Color backgroundColor = const Color(0xAA000000),
/// defines the background color of toast message
textStyle = const TextStyle(fontSize: 15, color: Colors.white),
/// for toast message styling
double backgroundRadius = 20,
/// you can apply toast message background radius
bool? rootNavigator,
Border? border,
/// you can specify background border
}) {
_FlutterToastView.dismiss();
_FlutterToastView.createView(msg, context, duration, position,
backgroundColor, textStyle, backgroundRadius, border, rootNavigator);
}