getVersionCheck method

Future<VersionCheck> getVersionCheck()

Check if the news app version is supported by this client

Also returns the supported API version number

Implementation

Future<VersionCheck> getVersionCheck() async {
  final response = await getSupportedApiVersions();
  final versions = response.body.apiLevels;
  return VersionCheck(
    versions: versions?.map((version) => Version.parse(version.substring(1).replaceAll('-', '.'))).toList(),
    minimumVersion: minVersion,
    maximumMajor: null,
  );
}