toEnum<T extends Enum> method
T
toEnum<T extends Enum>({})
Converts to T using parser, mirroring Convert.toEnum.
Implementation
T toEnum<T extends Enum>({
required T Function(dynamic) parser,
dynamic mapKey,
int? listIndex,
T? defaultValue,
Map<String, dynamic>? debugInfo,
}) => ConvertObjectImpl.toEnum<T>(
_value,
parser: parser,
mapKey: mapKey,
listIndex: listIndex,
defaultValue: defaultValue ?? _defaultValue as T?,
debugInfo: debugInfo,
);