firstOr method

T? firstOr([
  1. T? ifEmpty
])

Implementation

T? firstOr([T? ifEmpty]) {
  if (this.isEmpty) return ifEmpty;
  return this.first;
}