getPlatformVersion method

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

Retrieves the running platform's version string.

This method invokes the platform-specific 'getPlatformVersion' method via the methodChannel.

Implementation

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