cast<T> static method

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

Implementation

static T? cast<T>(x) => x is T ? x : null;