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