$cast<T> function
T?
$cast<T>(
- dynamic value
Returns T
if instance of T
, otherwise null
Implementation
T? $cast<T>(value) => value == null
? null
: value is T
? value
: null;