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:

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 value is null, otherwise WidgetStatePropertyAll<T>(value).
resolveOverlay(Color? defaultValue, Color? hovered, Color? pressed) → WidgetStateProperty<Color?>?
Returns a WidgetStateProperty for overlay colors that resolves to pressed when WidgetState.pressed, hovered when WidgetState.hovered, and defaultValue otherwise.
resolveSide(BorderSide? defaultValue, BorderSide? selected, BorderSide? disabled) → WidgetStateBorderSide?
Returns a WidgetStateBorderSide that resolves to disabled when WidgetState.disabled, selected when WidgetState.selected, and defaultValue otherwise.
resolveWith<T>(T? defaultValue, T? selected, T? disabled) → WidgetStateProperty<T?>?
Returns a WidgetStateProperty that resolves to disabled when WidgetState.disabled, selected when WidgetState.selected, and defaultValue otherwise.