Badge constructor
Badge({
- Key? key,
- String? text,
- Color? badgeColor,
- Color? textColor,
- double? fontSize,
- EdgeInsets padding = const EdgeInsets.only(top: 2, right: 4, bottom: 2, left: 4),
- Radius radius = const Radius.circular(8),
- TextStyle? textStyle,
- InlineSpan? textSpan,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- Text? textView,
Implementation
Badge({
super.key,
String? text,
Color? badgeColor,
Color? textColor,
double? fontSize,
this.padding = const EdgeInsets.only(top: 2, right: 4, bottom: 2, left: 4),
this.radius = const Radius.circular(8),
TextStyle? textStyle,
this.textSpan,
this.style,
this.strutStyle,
this.textAlign,
this.textDirection,
this.locale,
this.softWrap,
this.overflow,
this.textScaleFactor,
this.maxLines,
this.semanticsLabel,
this.textWidthBasis,
this.textView,
}) : text = text ?? '',
textStyle = textStyle ??
TextStyle(
color: textColor ?? Colors.white, fontSize: fontSize ?? 10),
badgeColor = badgeColor ?? Colors.blue;