castOrNull<R> method

List<R>? castOrNull<R>()

convert to other

Implementation

List<R>? castOrNull<R>() {
  try {
    return cast<R>();
  } catch (e) {
    return null;
  }
}