getDeviceSystemVersion static method
Uses plugin "device_info" Source: https://stackoverflow.com/questions/45300661/how-to-check-the-device-os-version-from-flutter
Implementation
static Future<String> getDeviceSystemVersion() async {
if (TextUtils.isEmptyOrNull(_osv)) {
if (dartIo.Platform.isAndroid) {
TBLAndroidDevice androidDeviceInfo =
await _deviceInfoPlugin.androidInfo;
_osv = androidDeviceInfo.version.release ?? "";
}
if (dartIo.Platform.isIOS) {
TBLIosDevice iosDeviceInfo = await _deviceInfoPlugin.iosInfo;
_osv = iosDeviceInfo.systemVersion ?? "";
}
}
return _osv;
}