WidgetStateUtils mixin
Utility methods for building WidgetStateProperty values from simple parameters.
Provides convenience factories for common state resolution patterns used across Stream design system component styles.
See also:
- StreamCheckboxStyle.from, which uses these helpers.
- StreamButtonThemeStyle.from, which uses these helpers.
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
Static Methods
-
allOrNull<
T> (T? value) → WidgetStateProperty< T> ? -
Returns null if
valueis null, otherwiseWidgetStatePropertyAll<T>(value). -
resolveOverlay(
Color? defaultValue, Color? hovered, Color? pressed) → WidgetStateProperty< Color?> ? -
Returns a WidgetStateProperty for overlay colors that resolves to
pressedwhen WidgetState.pressed,hoveredwhen WidgetState.hovered, anddefaultValueotherwise. -
resolveSide(
BorderSide? defaultValue, BorderSide? selected, BorderSide? disabled) → WidgetStateBorderSide? -
Returns a WidgetStateBorderSide that resolves to
disabledwhen WidgetState.disabled,selectedwhen WidgetState.selected, anddefaultValueotherwise. -
resolveWith<
T> (T? defaultValue, T? selected, T? disabled) → WidgetStateProperty< T?> ? -
Returns a WidgetStateProperty that resolves to
disabledwhen WidgetState.disabled,selectedwhen WidgetState.selected, anddefaultValueotherwise.