register method

  1. @override
void register(
  1. Container container
)
override

Register services with the container.

This method is called when the provider is registered with the container. Use this method to register bindings, instances, and aliases.

Implementation

@override
void register(Container container) {
  if (!container.has<EngineConfig>()) {
    return;
  }

  if (!container.has<ViewEngineManager>()) {
    container.instance<ViewEngineManager>(ViewEngineManager());
  }

  _fallbackFileSystem = container.get<EngineConfig>().fileSystem;
  if (container.has<StorageManager>()) {
    _storageManager = container.get<StorageManager>();
  }

  if (container.has<Config>()) {
    _applyConfig(container, container.get<Config>());
  }
}