BannerPainter constructor

BannerPainter({
  1. required String message,
  2. required TextDirection textDirection,
  3. required NUIBannerLocation location,
  4. required TextDirection layoutDirection,
  5. Color color = const Color(0xA0B71C1C),
  6. double height = 12,
  7. TextStyle? textStyle,
  8. LinearGradient? gradient,
  9. BoxShadow shadow = const BoxShadow(color: Colors.black12, blurRadius: 6.0),
})

Implementation

BannerPainter({
  required this.message,
  required this.textDirection,
  required this.location,
  required this.layoutDirection,
  this.color = const Color(0xA0B71C1C),
  this.height = 12,
  this.textStyle,
  this.gradient,
  this.shadow = const BoxShadow(
    color: Colors.black12,
    blurRadius: 6.0,
  )
}) : assert(message != null),
      assert(textDirection != null),
      assert(location != null),
      assert(color != null),
      assert(textStyle != null),
      super(repaint: PaintingBinding.instance.systemFonts){
  this.height = this.height ?? 12;
  this.textStyle = this.textStyle ?? TextStyle(
    color: Color(0xFFFFFFFF),
    fontSize: height * 0.85,
    fontWeight: FontWeight.w900,
    height: 1.0,
  );
  this.color = this.color ?? Color(0xA0B71C1C);
}