getOrNull method
Returns an element at the given index or null if the index is out of bounds of this list.
Implementation
T? getOrNull(int index) {
return index >= 0 && index <= lastIndex ? get(index) : null;
}
Returns an element at the given index or null if the index is out of bounds of this list.
T? getOrNull(int index) {
return index >= 0 && index <= lastIndex ? get(index) : null;
}