compareBrowserVersions method

Future<int?> compareBrowserVersions({
  1. required String version1,
  2. required String version2,
})

This method is for anyone want to compare version correctly to determine which version is newer, older or same.

Use it to determine whether to use webview2 or certain feature based upon version. Sets the value of result to -1, 0 or 1 if version1 is less than, equal or greater than version2 respectively. Returns null if it fails to parse any of the version strings. Directly use the version info obtained from getAvailableVersion with input, channel information is ignored.

Officially Supported Platforms/Implementations:

Implementation

Future<int?> compareBrowserVersions(
    {required String version1, required String version2}) {
  throw UnimplementedError(
      'compareBrowserVersions is not implemented on the current platform');
}