ifAbsent method

void ifAbsent(
  1. void ifAbsent()
)

Execution a function if the Optional value is absent.

Implementation

void ifAbsent(void Function() ifAbsent) {
  if (!isPresent) {
    ifAbsent();
  }
}