showErrorBar<T> method
Future<T?>
showErrorBar<T>({
- required Widget content,
- FlashPosition position = FlashPosition.bottom,
- Duration duration = const Duration(seconds: 3),
- Icon? icon = const Icon(Icons.error_outline),
- Color? indicatorColor = const Color(0xFFE57373),
- FlashBuilder<
T> ? primaryActionBuilder,
Show a error flash bar.
Implementation
Future<T?> showErrorBar<T>({
required Widget content,
FlashPosition position = FlashPosition.bottom,
Duration duration = const Duration(seconds: 3),
Icon? icon = const Icon(Icons.error_outline),
Color? indicatorColor = const Color(0xFFE57373),
FlashBuilder<T>? primaryActionBuilder,
}) {
return showFlash<T>(
context: this,
duration: duration,
builder: (context, controller) {
return FlashBar(
controller: controller,
position: position,
indicatorColor: indicatorColor,
icon: icon,
content: content,
primaryAction: primaryActionBuilder?.call(context, controller),
);
},
);
}