getOSVersion method
Implementation
Future<void> getOSVersion() async {
await FkUserAgent.init();
Constants.userAgent = FkUserAgent.webViewUserAgent;
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
Constants.osVersion = androidInfo.version.release;
Constants.mobileModel = androidInfo.model;
Constants.osName = "Android";
} else if (Platform.isIOS) {
IosDeviceInfo iosDeviceInfo = await deviceInfo.iosInfo;
Constants.osVersion = iosDeviceInfo.systemVersion;
Constants.mobileModel = iosDeviceInfo.model;
Constants.osName = "Iphone";
}
}