letAsOrNull<T> function

T? letAsOrNull<T>(
  1. dynamic input
)

Casts input to type T, returning Null on failure.

Supported types:

Implementation

@pragma('vm:prefer-inline')
T? letAsOrNull<T>(dynamic input) => input is T ? input : null;