getPlatformVersion static method

List getPlatformVersion()

Returns the platform version as a List.

Implementation

static List getPlatformVersion() {
  if (!kIsWeb && Platform.isIOS) {
    final version = Platform.operatingSystemVersion;
    final regex = RegExp(r'^Version (\d+)\.(\d+)');
    final match = regex.firstMatch(version);
    return match!.groups([1, 2]);
  }
  return ['0', '0', '0'];
}