force method

Future<T> force()

Lazily evaluates the function passed into the constructor.

Implementation

@pragma("vm:prefer-inline")
Future<T> force() async {
  if (_isSet) {
    return _val!;
  }
  _isSet = true;
  _val = await _func();
  return _val;
}