showErrorFlashbar method
Shows an error flashbar/toast with a customizable info message (optional).
It uses the following theme values for styling:
- dialogBackgroundColor
- textTheme.bodyText2
- iconTheme.size
Implementation
Future<void> showErrorFlashbar({
String message = 'Oops, something went wrong.',
Duration duration = const Duration(seconds: 3),
}) {
return _showFlashbar(
message,
duration: duration,
icon: Icons.error_outline_rounded,
iconColor: Colors.red.shade400,
);
}