ifPresent abstract method
void
ifPresent(
- void consume(
- T
- void orElse(),
Invokes consume() with this Optional's value, if present. Otherwise, if orElse is passed, invokes it, otherwise does nothing.
Implementation
void ifPresent(void Function(T) consume, {void Function() orElse});