Home > Mobile >  How to switch off unneeded plugin which produce error?
How to switch off unneeded plugin which produce error?

Time:08-10

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:

Referring enter image description here

the issue will resolve for me and all of my team.

  • Related