getWidgetUrlFromAppKey method
Implementation
String getWidgetUrlFromAppKey(String appKey) {
String widgetUrl = '';
if (kDebugMode) {
print('getWidgetUrlFromAppKey');
}
if (appKey.startsWith(Constants.prefixDevAppKey)) {
widgetUrl = Constants.devWidgetUrl;
} else if (appKey.startsWith(Constants.prefixStageAppKey)) {
widgetUrl = Constants.stageWidgetUrl;
} else if (appKey.startsWith(Constants.prefixLiveAppKey)) {
widgetUrl = Constants.prodWidgetUrl;
} else {
if (kDebugMode) {
print('Invalid App Key');
return widgetUrl;
}
}
if (!widgetUrl!.endsWith('/')) {
widgetUrl = '$widgetUrl/';
}
return widgetUrl;
}