TextStatusBadge constructor
const
TextStatusBadge({})
Creates a TextStatusBadge widget.
Parameters:
status: The status text to display (required).color: Explicit text color (optional, defaults to black).textColorKey: Theme token key or hex string for text color (optional).backgroundColorKey: Theme token key or hex string for background color (preferred).backgroundColor: Explicit background color (deprecated, use backgroundColorKey instead).borderColor: Explicit border color (optional).borderColorKey: Theme token key or hex string for border color (optional).
Note: Color resolution priority:
- Explicit color values (
color,backgroundColor,borderColor) - Theme token keys or hex strings (
textColorKey,backgroundColorKey,borderColorKey) - Default theme tokens ('default' group) if no keys provided
- Automatic text color calculation based on background luminance
Implementation
const TextStatusBadge({
super.key,
required this.status,
// @Deprecated(
// 'Use backgroundColorKey or theme tokens; this prop will be removed in a future release.')
this.backgroundColor, // Default background color
this.color = const Color(0xFF000000), // Default text color
this.textColorKey,
this.backgroundColorKey,
this.borderColor,
this.borderColorKey,
});