getDataCenterUrl function
Retrieves the data center URL from the storage configuration. Throws an exception if the data center URL is not defined.
Implementation
Future<String> getDataCenterUrl() async {
final config = await getStorageItem(key: 'sgm_config');
final dataCenterUrl = config?['dataCenterUrl'];
if (dataCenterUrl == null || dataCenterUrl == '') {
throw Exception('Error: Base URL is not defined.');
}
return dataCenterUrl;
}