update method

Future<void> update({
  1. required ConfigSection section,
  2. required InitConfig config,
})

Updates the specified configuration section.

Implementation

Future<void> update(
    {required ConfigSection section, required InitConfig config}) async {
  LoggerService.section('Update ${section.name} Configuration');

  switch (section) {
    case ConfigSection.flavors:
      await _updateFlavors(config);

    case ConfigSection.environment:
      await _updateEnvironment(config);

    case ConfigSection.firebase:
      await _updateFirebase(config);

    case ConfigSection.localization:
      await _updateLocalization(config);
  }

  LoggerService.blank();
  LoggerService.success(
      '${section.name} configuration updated successfully.');
  LoggerService.blank();
}