getCurrentAndroidSdkVersion method
Implementation
Future<int> getCurrentAndroidSdkVersion() async {
try {
final int? sdkVersion =
await methodChannel.invokeMethod('getCurrentSdkVersion');
if (sdkVersion != null) {
return sdkVersion;
} else {
throw PlatformException(
code: 'UNKNOWN_SDK_VERSION',
message: 'Failed to retrieve SDK version.',
);
}
} on PlatformException catch (_) {
rethrow;
}
}