safeCast<T> function

T? safeCast<T>(
  1. dynamic value
)

Implementation

T? safeCast<T>(dynamic value) => value is T ? value : null;