loadFromUrlIntoKey method
Loading a configuration file from the given url
into the current app config with the given key
.
It uses a http GET request to fetch the configuration.
The request can be modified with queryParameters
and headers
.
Implementation
Future<GlobalConfiguration> loadFromUrlIntoKey(String url, String key,
{Map<String, String> queryParameters,
Map<String, String> headers}) async {
Map<String, dynamic> configAsMap = await _getFromUrl(url,
queryParameters: queryParameters, headers: headers);
appConfig.putIfAbsent(key, () => configAsMap);
return _singleton;
}