getPlatformVersion method

  1. @override
Future<String> getPlatformVersion()
override

Fetches the native platform version string.

Example: "Android 13" or "iOS 16.1". Returns a Future completing with the platform version string.

Implementation

@override
Future<String> getPlatformVersion() async {
  final String version =
      await methodChannel.invokeMethod('getPlatformVersion') ??
          'Unknown Platform Version';
  return version;
}