cast<T> function
If x
is an instance of T
, returns x
cast to T
,
otherwise returns null
.
since 0.0.1
Implementation
T? cast<T>(Object? x) => x is T ? x : null;
If x
is an instance of T
, returns x
cast to T
,
otherwise returns null
.
since 0.0.1
T? cast<T>(Object? x) => x is T ? x : null;