make<T> abstract method

T make<T>({
  1. String? name,
  2. Map<String, dynamic>? options,
})

Resolves a service instance.

Throws ServiceContainerException.registrationNotFound if not registered.

final logger = container.make<Logger>();
final namedLogger = container.make<Logger>(name: 'file');
final withOptions = container.make<ApiClient>(options: {'url': 'https://api.com'});

Implementation

T make<T>({String? name, Map<String, dynamic>? options});