storeSettings static method

Future<void> storeSettings({
  1. required ServerpodCloudSettingsData settings,
  2. required String localStoragePath,
})

Implementation

static Future<void> storeSettings({
  required final ServerpodCloudSettingsData settings,
  required final String localStoragePath,
}) async {
  try {
    await LocalStorageManager.storeJsonFile(
      fileName: ResourceManagerConstants.settingsFilePath,
      json: settings.toJson(),
      localStoragePath: localStoragePath,
    );
  } on Exception catch (e, s) {
    throw FailureException.nested(e, s, 'Failed to store settings.');
  }
}