getDeviceSystemVersion static method

Future<String> getDeviceSystemVersion()

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;
}