getPlatformVersion method

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

Returns a String containing the version of the platform.

Implementation

@override
Future<String?> getPlatformVersion() async {
  try {
    final version =
        await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  } on PlatformException catch (e) {
    throw MCPPlatformException(
        'Failed to get platform version', e.code, e.details);
  }
}