as<T> method
T?
as<T>()
Casts the receiver object to the given type T
or returns null otherwise.
Implementation
T? as<T>() => (this is T) ? this as T : null;
Casts the receiver object to the given type T
or returns null otherwise.
T? as<T>() => (this is T) ? this as T : null;