How to solve flutter run(build) error:
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(
I don't need windows-plugin in the dependencies of device_info_plus plugin. Flutter doctor all is ok How to switch off "device_info_plus_windows" plugin in the project ?
CodePudding user response:
flutter/.pub-cache/...
Whenever you have problems like these, i.e. unwanted stuff in your cache, you need to clean your workspace before compiling again.
Ensure you've removed all of the unwanted dependencies from your pubspec.yaml
.
Then, in your current working directory (cwd), run:
flutter clean && flutter pub get && flutter run
This should be enough.
CodePudding user response:
the issue will resolve for me and all of my team.