showNoConnectionFlashbar method
Shows a no connection flashbar/toast with a customizable info message (optional).
It uses the following theme values for styling:
- dialogBackgroundColor
- textTheme.bodyText2
- iconTheme.size
Implementation
Future<void> showNoConnectionFlashbar({
String message =
'No internet connection. Please turn on Wi-Fi or cellular data.',
Duration duration = const Duration(seconds: 3),
}) {
return _showFlashbar(
message,
duration: duration,
icon: Icons.wifi_off_rounded,
iconColor: Colors.red.shade400,
);
}