getPlatformVersion method
Returns the current platform version.
This method is primarily used for testing and debugging to verify that the method channel communication is working correctly between Flutter and the native platform.
Each platform implementation should override this method to return meaningful platform information.
Returns a string containing the platform name and version (e.g., "Android 12" or "iOS 15.0"), or null if unavailable.
Implementation
@override
Future<String?> getPlatformVersion() async {
final version = await methodChannel.invokeMethod<String>(
'getPlatformVersion',
);
return version;
}