plus_plugins
plus_plugins copied to clipboard
[Bug]: (device_info_plus) WebBrowser info is not extracted
Platform
IOS 17.5
Plugin
device_info_plus
Version
11.1.0
Flutter SDK
3.24.3
Steps to reproduce
Teted on Physical Iphone 12 Pro Max, IOS simulator or Android Emulator can not receive webBrowserInfo. All receive below error:
I/flutter ( 5140): type 'BaseDeviceInfo' is not a subtype of type 'WebBrowserInfo' in type cast I/flutter ( 5140): #0 DeviceInfoPlugin.webBrowserInfo (package:device_info_plus/device_info_plus.dart:79:62)
Code Sample
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
final webBrowserInfo = await deviceInfo.webBrowserInfo;
print(webBrowserInfo);
Example app code has if(kIsWeb) so it is not receiving userAgent or webBrowser for Android or IOS it is misleading
Logs
[ +21 ms] Performing hot restart... (completed in 1,042ms)
[ ] Restarted application in 1,052ms.
[ +462 ms] I/flutter (10214): type 'BaseDeviceInfo' is not a subtype of type 'WebBrowserInfo' in type cast
[ +84 ms] D/EGL_emulation(10214): app_time_stats: avg=12059.76ms min=5.47ms max=36157.61ms count=3
Flutter Doctor
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348
darwin-arm64, locale en-TR)
• Flutter version 3.24.3 on channel stable at
/Users/arrrrny/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (5 weeks ago), 2024-09-11
16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
• Android SDK at /Users/arrrrny/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /Users/arrrrny/Library/Android/sdk
• Java binary at:
/opt/homebrew/Cellar/openjdk@17/17.0.12/libexec/openjdk.jdk/Con
tents/Home/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build
17.0.12+0)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google
Chrome
[✓] Android Studio (version 2024.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
21.0.3+-79915917-b509.11)
[✓] VS Code (version 1.94.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0
[✓] Connected device (6 available)
• sdk gphone64 arm64 (mobile) • emulator-5554
• android-arm64 • Android 13 (API 33) (emulator)
• ARRRRNY (mobile) • 00008101-00115C381E10801E
• ios • iOS 18.0.1 22A3370
• iPhone 15 (mobile) •
E80A1682-8841-46B5-BF4C-C0654237453B • ios •
com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
• macOS (desktop) • macos
• darwin-arm64 • macOS 15.0.1 24A348 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad
• darwin • macOS 15.0.1 24A348 darwin-arm64
• Chrome (web) • chrome
• web-javascript • Google Chrome 129.0.6668.101
[✓] Network resources
• All expected network resources are available.
• No issues found!
Checklist before submitting a bug
- [X] I searched issues in this repository and couldn't find such bug/problem
- [X] I Google'd a solution and I couldn't find it
- [X] I searched on StackOverflow for a solution and I couldn't find it
- [X] I read the README.md file of the plugin
- [X] I'm using the latest version of the plugin
- [X] All dependencies are up to date with
flutter pub upgrade - [X] I did a
flutter clean - [X] I tried running the example project