get<T extends Object> static method

T get<T extends Object>()

Gets an instance of a registered object

This method is a shorthand for GetIt.instance.get.

It returns the instance of the type T that was registered with GetIt.

If no instance is registered, it throws a StateError.

Implementation

static T get<T extends Object>() {
  /// Gets an instance of a registered object
  return GetIt.instance<T>();
}