fromString<T> static method
Wraps a String-based parser to accept dynamic values.
Useful for integrating with code generators that produce fromString
methods, such as json_serializable or freezed.
Implementation
static T Function(dynamic) fromString<T>(T Function(String) fromString) =>
(dynamic obj) => fromString(obj.toString());