showMaterialBanner static method
void
showMaterialBanner({
- Key? key,
- required Widget content,
- TextStyle? contentTextStyle,
- List<
Widget> ? actions, - double? elevation,
- Widget? leading,
- Color? backgroundColor,
- Color? surfaceTintColor,
- Color? shadowColor,
- Color? dividerColor,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? leadingPadding,
- bool forceActionsBelow = false,
- OverflowBarAlignment overflowAlignment = OverflowBarAlignment.end,
- Animation<
double> ? animation, - void onVisible()?,
Implementation
static void showMaterialBanner({
Key? key,
required Widget content,
TextStyle? contentTextStyle,
List<Widget>? actions,
double? elevation,
Widget? leading,
Color? backgroundColor,
Color? surfaceTintColor,
Color? shadowColor,
Color? dividerColor,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? leadingPadding,
bool forceActionsBelow = false,
OverflowBarAlignment overflowAlignment = OverflowBarAlignment.end,
Animation<double>? animation,
void Function()? onVisible,
}) {
scaffoldMessengerKey.currentState?.showMaterialBanner(MaterialBanner(
key: key,
content: content,
contentTextStyle: contentTextStyle,
actions: actions ?? [],
elevation: elevation,
leading: leading,
backgroundColor: backgroundColor,
surfaceTintColor: surfaceTintColor,
shadowColor: shadowColor,
dividerColor: dividerColor,
padding: padding,
margin: margin,
leadingPadding: leadingPadding,
forceActionsBelow: forceActionsBelow,
overflowAlignment: overflowAlignment,
animation: animation,
onVisible: onVisible,
));
}