setup method

  1. @override
void setup(
  1. TConfig config
)
override

Sets up the registry with access to a config.

Implementation

@override
void setup(TConfig config) {
  // Register default implementations here
  injector
    ..registerSingleton<TConfig>(() => config)
    ..registerSingleton<http.Client>(() => http.Client())
    ..register<Runtime>(Factory.singleton(() => Runtime()))
    ..register<BaseAppApiHandler>(withConfig((c) => BaseAppApiHandler(
          config: c,
          httpClient: httpClient,
        )));
}