force method

  1. @override
Future<T> force()
override

Lazily evaluates the function passed into the constructor.

Implementation

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