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