BannerPainter constructor Null safety

BannerPainter(
  1. {required String message,
  2. required TextDirection textDirection,
  3. required BannerLocation location,
  4. required TextDirection layoutDirection,
  5. Color color = _kColor,
  6. TextStyle textStyle = _kTextStyle}
)

Creates a banner painter.

The message, textDirection, location, and layoutDirection arguments must not be null.

Implementation

BannerPainter({
  required this.message,
  required this.textDirection,
  required this.location,
  required this.layoutDirection,
  this.color = _kColor,
  this.textStyle = _kTextStyle,
}) : assert(message != null),
     assert(textDirection != null),
     assert(location != null),
     assert(color != null),
     assert(textStyle != null),
     super(repaint: PaintingBinding.instance.systemFonts);