init static method

Future<void> init({
  1. Map? initial,
  2. String defaultPath = _kApplication,
  3. Set<String>? paths,
  4. ConfigDelegate? delegate,
  5. bool showLogs = false,
  6. required bool connected,
  7. String name = kDefaultConfigName,
  8. PlatformType platform = PlatformType.system,
  9. EnvironmentType environment = EnvironmentType.system,
})

Implementation

static Future<void> init({
  Map? initial,
  String defaultPath = _kApplication,
  Set<String>? paths,
  ConfigDelegate? delegate,
  bool showLogs = false,
  required bool connected,
  String name = kDefaultConfigName,
  PlatformType platform = PlatformType.system,
  EnvironmentType environment = EnvironmentType.system,
}) async {
  paths ??= {...kDefaultConfigPaths, ...delegate?.paths ?? {}};
  i._defaultPath = defaultPath;
  i._paths = paths;
  i._name = name;
  i._showLogs = showLogs;
  i._environment = environment;
  i._platform = platform;
  i._delegate = delegate;
  i._connected = connected;
  await i._loads();
  i._subscribes();
}