unhandled exception bad state no element on camera flutter 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);