MotionBadgeWidget constructor
const
MotionBadgeWidget({})
Creates a MotionBadgeWidget.
text is the badge text (at most 3 characters). When isIndicator is
true, a plain dot is rendered instead of a text badge. color and
textColor control the badge and text colors, size controls the
badge size, disabled dims the badge, and show toggles visibility.
Implementation
const MotionBadgeWidget({
Key? key,
bool? isIndicator,
this.text,
Color? textColor,
double? size,
Color? color,
bool? disabled,
bool? show,
}) : _isIndicator = isIndicator ?? false,
_color = color ?? Colors.red,
_textColor = textColor ?? Colors.white,
_size = size ?? (isIndicator == true ? 5 : 18),
_disabled = disabled ?? false,
_show = show ?? true,
assert(text != null ? text.length <= 3 : true),
super(key: key);