Is it possible? related to flutter plugin? or is it related to the Problem pane? I can remove hints from problem pane but not from the editor (shows squiggles). Since flutter is already quite verbose, these don't help, especially in the middle of writing the software.(import, consts etc)
CodePudding user response:
From Dart 2.15, you can add the lint rules that you would like to ignore to your analysis_options.yaml
file. If you do not have it in your project. Add it to your root project system. After that you can add the lint rules that you would like to ignore to it.
include: package:flutter_lints/flutter.yaml
linter:
rules:
prefer_const_constructors_in_immutables:
enabled: false
p.s. My honest and professional opinion is for you to follow the analyzer. It works for your own good.
CodePudding user response:
All the issues that are displayed can be controlled by adding/removing rules in your source code. It's also a good idea to actually address those issues than just silencing them.
For instance, you would normally get a warning if you have unused imports like so:
However, you can either use a directive to disable them in the current file as shown in top of this code:
CodePudding user response:
Here is a shortcut method to deal with.
- Goto that line where squiggly line is
- Click on that small icon.
- Choose what you want
You can add const
as well
CodePudding user response:
In another way, you can use fix_import solution. While you're writing code, use the fix import command with cmd p or control p then it'll be automatically fixed to the relative path to all your import.
https://marketplace.visualstudio.com/items?itemName=luanpotter.dart-import