Banner constructor Null safety

const Banner(
  1. {Key? key,
  2. Widget? child,
  3. required String message,
  4. TextDirection? textDirection,
  5. required BannerLocation location,
  6. TextDirection? layoutDirection,
  7. Color color = _kColor,
  8. TextStyle textStyle = _kTextStyle}
)

Creates a banner.

The message and location arguments must not be null.

Implementation

const Banner({
  super.key,
  this.child,
  required this.message,
  this.textDirection,
  required this.location,
  this.layoutDirection,
  this.color = _kColor,
  this.textStyle = _kTextStyle,
}) : assert(message != null),
     assert(location != null),
     assert(color != null),
     assert(textStyle != null);