firstOrDefault method
E
firstOrDefault(
- E defaultValue
Returns the first element or defaultValue when null or empty.
Implementation
E firstOrDefault(E defaultValue) =>
isNotEmptyOrNull ? this!.first : defaultValue;