getAndroidSdkVersion function
Implementation
Future<int?> getAndroidSdkVersion() async {
if (Platform.isAndroid) {
BaseDeviceInfo deviceInfo = await getDeviceInfo();
AndroidDeviceInfo androidDeviceInfo =
AndroidDeviceInfo.fromMap(deviceInfo.data);
return androidDeviceInfo.version.sdkInt;
}
return null;
}