getPlatformVersion method

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

Gets the platform version.

Implementation

@override
Future<String?> getPlatformVersion() async {
  try {
    final version =
        await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print('Error getting platform version: ${e.message}');
    }
    return null;
  }
}