Closed
Description
Platform
Android
Plugin
device_info_plus
Version
^3.2.3
Flutter SDK
3.0.5
Steps to reproduce
Try to run the app after doing flutter pub upgrade
I get the example.
../../../../src/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus_windows-2.1.1/lib/src/device_info_plus_windows.dart:24:35: Error: Required named parameter 'userName' must be provided.
final data = WindowsDeviceInfo(
^
../../../../src/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus_platform_interface-2.4.0/lib/model/windows_device_info.dart:12:3: Context: Found this candidate, but the arguments don't match.
WindowsDeviceInfo({
^^^^^^^^^^^^^^^^^
Code Sample
No response
Logs
../../../../src/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus_windows-2.1.1/lib/src/device_info_plus_windows.dart:24:35: Error: Required named parameter 'userName' must be provided.
final data = WindowsDeviceInfo(
^
../../../../src/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus_platform_interface-2.4.0/lib/model/windows_device_info.dart:12:3: Context: Found this candidate, but the arguments don't match.
WindowsDeviceInfo({
^^^^^^^^^^^^^^^^^
Flutter Doctor
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.3.1 21E258 darwin-arm, locale en-ZA)
• Flutter version 3.0.5 at /Users/danemackier/src/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (4 weeks ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/danemackier/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• 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 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.70.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0
[✓] Connected device (3 available)
• SM G960F (mobile) • 2223cc1a36057ece • android-arm64 • Android 10 (API 29)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.3.1 21E258 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.134
[✓] HTTP Host Availability
• All required HTTP hosts are available
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
GauravCalidig commentedon Aug 8, 2022
Stuck on same
FilledStacks commentedon Aug 8, 2022
Anyone have a workaround yet? I'm trying to do dependency overrides but nothing is making it pass.
If you find a version that works please post, I have an urgent build to get out.
GauravCalidig commentedon Aug 8, 2022
If it's urgent, As a quick workaround you can comment the code giving error. if you are not building a windows app it should work fine @FilledStacks

FilledStacks commentedon Aug 8, 2022
Thanks. This works locally. Not when I try and make a release to QA through our CI pipeline. I'll remove the package for now and add it back when this is fixed.
Thanks for the response.
sara010 commentedon Aug 8, 2022
same problem
ryzizub commentedon Aug 8, 2022
I temporary added overrides to pubspec.yaml, seems to work pretty well :)
xrandy00 commentedon Aug 8, 2022
Since we specify the version of device_info_plus directly, I just added this

ixre commentedon Aug 8, 2022
Edit file device_info_plus_windows/lib/src/device_info_plus_windows.dart like this
now, i have avoid it temporarily.
M123-dev commentedon Aug 8, 2022
We had the same problem. After upgrading to
^4.0.2
it seems to be fixed.Tests as well as local debug building works again
miquelbeltran commentedon Aug 10, 2022
Could you provide exact steps to reproduce the issue?
If I do the following, I can compile the app without issues:
flutter pub add device_info_plus
All of that works.
20 remaining items