OudsIconStatus class sealed
Describes the configuration for an OudsBadge / OudsTag with an icon.
This sealed class defines the intent of the component's appearance, which in turn determines the icon to display and its associated colors.
Subclasses are provided for each specific status:
- Neutral and Accent allow for a user-defined custom icon.
- Positive, Info, Warning, and Negative use fixed icons defined by the design system to convey a specific meaning.
Example usage in OudsBadge
// A badge with a fixed "success" icon.
OudsBadge.icon(
iconStatus: Positive(),
child: Avatar(),
);
// A badge with a custom user-provided icon.
OudsBadge.icon(
iconStatus: Neutral(icon: 'assets/my_custom_icon.svg'),
child: Avatar(),
);
### Example usage in [OudsTag]
```dart
// A tag with a fixed "success" icon.
OudsTag(
label: 'Success',
iconStatus: Positive(),
);
// A tag with a custom user-provided icon.
OudsTag(
label: 'Custom',
iconStatus: Neutral(icon: 'assets/my_custom_icon.svg'),
);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited