fetchUpdates method

Future<UpdateResult?> fetchUpdates()

Fetch update results filter by countryCode if appId is provided

countryCode is ISO 3166-1-alpha-2 country code

Example: US, EU, UK, SG, MY

Implementation

Future<UpdateResult?> fetchUpdates() async {
  if (Platform.isIOS) {
    assert(appId != null, "appId must not be null for iOS");
    return await IosAppId(appId!, countryCode)
        .fetchUpdate();
  } else if (Platform.isAndroid || Platform.isWindows) {
    assert(versionUrl != null,
        'versionUrl must not be null for the current platform.');
    return await Url(versionUrl!).fetchUpdate();
  } else {
    throw Exception('Platform not supported');
  }
}