getOrNull method

T? getOrNull(
  1. int index
)

Returns the indexth element. If that index doesn't exist (negative or out of range), will return null. This method will never throw an error.

Implementation

T? getOrNull(int index) => (index < 0 || index >= _l.length) //
    ? null
    : _l[index];