WidgetStateTextStyle.fromMap constructor
- WidgetStateMap<
TextStyle> map
Creates a WidgetStateTextStyle from a WidgetStateMap.
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 WidgetStateTextStyle objects (throws an error if used as a regular TextStyle).
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 WidgetStateTextStyle.fromMap(WidgetStateMap<TextStyle> map) =
_WidgetTextStyleMapper;