orElseGet method

T orElseGet(
  1. T other()
)

The bound value, or the result of other when nothing was bound. other is only called then, so it suits a default that is costly to build.

Implementation

T orElseGet(T Function() other) => isBound ? _value as T : other();