resolve method

Future<T?> resolve([
  1. A? arg
])

Execute asyncValue to resolve value.

Implementation

Future<T?> resolve([A? arg]) async {
  _status.value = UseAsyncStateStatus.loading;

  try {
    if (arg == null && null is! A) {
      return _value.value = await asyncValue();
    }

    return _value.value = await asyncValue(arg as A);
  } catch (e) {
    _error.value = e;

    return null;
  }
}