firstOrNull property
T?
firstOrNull
Returns the first element.
Return null
if the list has no element.
Implementation
T? get firstOrNull {
if (isEmpty) {
return null;
}
return first;
}
Returns the first element.
Return null
if the list has no element.
T? get firstOrNull {
if (isEmpty) {
return null;
}
return first;
}