storeServerpodCloudAuthData static method
Future<void>
storeServerpodCloudAuthData({
- required ServerpodCloudAuthData authData,
- required String localStoragePath,
Implementation
static Future<void> storeServerpodCloudAuthData({
required final ServerpodCloudAuthData authData,
required final String localStoragePath,
}) async {
try {
await LocalStorageManager.storeJsonFile(
fileName: ResourceManagerConstants.serverpodCloudAuthFilePath,
json: authData.toJson(),
localStoragePath: localStoragePath,
);
} on CreateException catch (e) {
throw Exception(
'Failed to store serverpod cloud data. error: ${e.error}',
);
} on SerializationException catch (e) {
throw Exception(
'Failed to store serverpod cloud data. error: ${e.error}',
);
} on WriteException catch (e) {
throw Exception(
'Failed to store serverpod cloud data. error: ${e.error}',
);
}
}