Flutter Platform.operatingSystemVersion is wrong on iOS

Viewed 233

In Flutter 2.0.0 stable, when I print out Platform.operatingSystem and Platform.operatingSystemVersion while running on an iOS 14.4 simulator, the operatingSystemVersion is wrong, and is the macOS version. Is there a workaround for getting the correct operating system version without using package device_info (which is not supported on macOS)?

Platform.operatingSystem: ios
Platform.operatingSystemVersion: 11.2.2

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.0, on macOS 11.2.2 20D80 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.54.1)
[✓] Connected device (4 available)

• No issues found!

VS Code WATCH

0 Answers
Related