loadSolutionsFromUrls static method

Future loadSolutionsFromUrls(
  1. List<String> urls,
  2. String environment, {
  3. String language = "en",
})

Implementation

static Future loadSolutionsFromUrls(List<String> urls, String environment,
    {String language = "en"}) async {
  final maps = <Map>[];
  for (var url in urls) {
    try {
      var response = await http.get(Uri.parse(url));
      if (response.isSuccess) {
        var solution = json.decodeWithReviver(response.body);
        maps.add(solution);
      }
    } catch (e) {
      _log.severe("Error downloading file '$url'.", e);
    }
  }
  loadSolutionsFromMaps(maps, environment, language: language);
}