ifPresent method

void ifPresent(
  1. void ifPresent(
    1. T value
    )
)

Executes a function if the Optional value is present.

Implementation

void ifPresent(void Function(T value) ifPresent) {
  if (isPresent) {
    ifPresent(_value!);
  }
}