BannerPainter constructor
BannerPainter({
- required String message,
- required TextDirection textDirection,
- required NUIBannerLocation location,
- required TextDirection layoutDirection,
- Color color = const Color(0xA0B71C1C),
- double height = 12,
- TextStyle? textStyle,
- LinearGradient? gradient,
- 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);
}