inject<T> method

T inject<T>({
  1. Map<String, dynamic>? parameters,
})

Implementation

T inject<T>({final Map<String, dynamic>? parameters}) {
  for (final module in _modules) {
    module
      ..internalGet = _dispatchInject
      ..parameters = parameters ?? <String, dynamic>{};
  }
  final instance = _dispatchInject<T>();
  for (final module in _modules) {
    module
      ..internalGet = null
      ..parameters = <String, dynamic>{};
  }
  return instance;
}