getPlatformVersion method

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

Get the platform version information.

Returns the platform version string or null if unavailable.

Implementation

@override
Future<String?> getPlatformVersion() async {
  try {
    final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  } on PlatformException catch (e) {
    debugPrint('Failed to get platform version: ${e.message}');
    return null;
  }
}