fetch<T> method

Future<T> fetch<T>(
  1. Resource<T> resource
)

Fetches an instance of resource.

Implementation

Future<T> fetch<T>(Resource<T> resource) async {
  if (resource._userBeforeExit != null) {
    _resourcesWithBeforeExit.add(resource);
  }
  _resources.add(resource);
  return resource._fetch(this);
}