MaterialBanner constructor

const MaterialBanner({
  1. Key? key,
  2. required Widget content,
  3. TextStyle? contentTextStyle,
  4. required List<Widget> actions,
  5. double? elevation,
  6. Widget? leading,
  7. Color? backgroundColor,
  8. Color? surfaceTintColor,
  9. Color? shadowColor,
  10. Color? dividerColor,
  11. EdgeInsetsGeometry? padding,
  12. EdgeInsetsGeometry? margin,
  13. EdgeInsetsGeometry? leadingPadding,
  14. bool forceActionsBelow = false,
  15. OverflowBarAlignment overflowAlignment = OverflowBarAlignment.end,
  16. Animation<double>? animation,
  17. VoidCallback? onVisible,
})

Creates a MaterialBanner.

The length of the actions list must not be empty. The elevation must be null or non-negative.

Implementation

const MaterialBanner({
  super.key,
  required this.content,
  this.contentTextStyle,
  required this.actions,
  this.elevation,
  this.leading,
  this.backgroundColor,
  this.surfaceTintColor,
  this.shadowColor,
  this.dividerColor,
  this.padding,
  this.margin,
  this.leadingPadding,
  this.forceActionsBelow = false,
  this.overflowAlignment = OverflowBarAlignment.end,
  this.animation,
  this.onVisible,
}) : assert(elevation == null || elevation >= 0.0);