getOrNull method

E? getOrNull(
  1. int index
)

Implementation

E? getOrNull(int index) {
  if (index < 0 || index >= length) return null;
  return this[index];
}