castOrNull<T> function

T? castOrNull<T>(
  1. dynamic x
)

Implementation

T? castOrNull<T>(dynamic x) => x is T ? x : null;