message static method
void
message(
- String message, {
- int duration = 2,
})
Implementation
static void message(String message, {int duration = 2}) {
if (!kIsWeb && Platform.isWindows) {
ScaffoldMessenger.of(Cry.context).hideCurrentSnackBar();
ScaffoldMessenger.of(Cry.context).showSnackBar(SnackBar(
content: Text(message),
));
} else {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: 1,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 16.0,
);
}
}