FWidgetStateMap class - forui.theme library (original) (raw)

A WidgetStateProperty that resolves to a T using a WidgetStateMap.

Constraints are checked in the order they are provided. The first constraint that is satisfied will have its associated value returned.

Example

final property = FWidgetStateMap<Color>({
  WidgetState.pressed: Colors.blue,
  WidgetState.hovered: Colors.green,
});

final color = property.resolve({WidgetState.pressed, WidgetState.hovered});
print(color); // Colors.blue

Properties

hashCodeint

The hash code for this object.

no setterinherited

runtimeTypeType

A representation of the runtime type of the object.

no setterinherited