call method

  1. @override
T call()
override

Lazily evaluates the function passed into the constructor.

Implementation

@override
T call() {
  if (_val == null) {
    _val = _func();
    return _val!;
  }
  return _val!;
}