BannerPainter constructor

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,
  7. BoxShadow shadow = _kShadow,
})

Creates a banner painter.

Implementation

BannerPainter({
  required this.message,
  required this.textDirection,
  required this.location,
  required this.layoutDirection,
  this.color = _kColor,
  this.textStyle = _kTextStyle,
  this.shadow = _kShadow,
}) : super(repaint: PaintingBinding.instance.systemFonts) {
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectCreated(
      library: _flutterWidgetsLibrary,
      className: '$BannerPainter',
      object: this,
    );
  }
}