getOrNull<T> method

T? getOrNull<T>(
  1. int index
)

Implementation

T? getOrNull<T>(int index) {
  try {
    return this[index] as T?;
  } catch (e) {
    return null;
  }
}