tryLoadSettings static method

Future<ServerpodCloudSettingsData?> tryLoadSettings({
  1. required String localStoragePath,
})

Implementation

static Future<ServerpodCloudSettingsData?> tryLoadSettings({
  required final String localStoragePath,
}) async {
  try {
    return await LocalStorageManager.tryFetchAndDeserializeJsonFile(
      fileName: ResourceManagerConstants.settingsFilePath,
      localStoragePath: localStoragePath,
      fromJson: ServerpodCloudSettingsData.fromJson,
    );
  } on Exception catch (e, s) {
    throw FailureException.nested(e, s, 'Failed to load settings.');
  }
}