toNullableValueOf<T extends Object> function
Converts data
to a value of T?
or throws if cannot convert.
Supported types for T
: String
, num
, int
, BigInt
, double
,
bool
, DateTime
, Identifier
, Object
.
Implementation
T? toNullableValueOf<T extends Object>(Object? data) =>
data == null ? null : toValueOf<T>(data);