parseAppCastItemsFromUri method

Future<List<AppCastItem>?> parseAppCastItemsFromUri(
  1. String appCastURL
)

Download the Appcast from appCastURL.

Implementation

Future<List<AppCastItem>?> parseAppCastItemsFromUri(String appCastURL) async {
  http.Response response;
  try {
    response = await client.get(Uri.parse(appCastURL));
  } catch (e) {
    if (kDebugMode) {
      print('hcUpgrade: parseAppcastItemsFromUri exception: $e');
    }
    return null;
  }
  final contents = utf8.decode(response.bodyBytes);
  return parseAppcastItems(contents);
}