resolveValue method

Object? resolveValue({
  1. QueryElementProvider? elementProvider,
  2. IntlMessageResolver? intlMessageResolver,
})

Resolve this DSX object value.

Implementation

Object? resolveValue(
    {QueryElementProvider? elementProvider,
    IntlMessageResolver? intlMessageResolver}) {
  if (_resolvedValue != null) {
    assert(_resolvedElement != null);
    return _resolvedValue;
  }

  if (isFunction) {
    var value = call();
    setResolvedValue(value);
    return value;
  } else if (isFuture) {
    assert(_future == null);
    var future = object as Future;
    future.then(setResolvedValue);
    _future = future;
    setResolvedValue('...');
    return _resolvedValue;
  } else {
    var value = object;
    setResolvedValue(value);
    return value;
  }
}