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