WidgetStateColor.fromMap constructor
- WidgetStateMap<
Color> map
Creates a WidgetStateColor from a WidgetStateMap<Color>.
This constructor's resolve method finds the first MapEntry whose key is satisfied by the set of states, and returns its associated value. It should only be used with widgets that document support for WidgetStateColor (throws an error if used as a normal Color).
To prevent a situation where each WidgetStatesConstraint isn't satisfied by the given set of states, consider adding WidgetState.any as the final WidgetStateMap key.
Implementation
const factory WidgetStateColor.fromMap(WidgetStateMap<Color> map) = _WidgetStateColorMapper;