Bad state: No element code example
Example: StateError (Bad state: No element)
// Use the orElse and set it to null.
someIterable.firstWhere(test, orElse: () => null);
// Use the orElse and set it to null.
someIterable.firstWhere(test, orElse: () => null);