getAt method

num? getAt(
  1. int index
)

Implementation

num? getAt(int index) {
  if (index < array.length) {
    return array[index];
  } else {
    return null;
  }
}