Flutter fix not givving suggestions for quick fix deprecated methods/parameters - flutter

According to the documentation on the new Flutter 2
(https://flutter.dev/docs/development/tools/flutter-fix), whenever a deprecated function is detected it should present an error and a quick fix.
I got the errors, but the quick fix isn't show, only the option to ignore hint.
I'm using vscode, already tryed to use vscode insiders, switch to flutter channel dev (Flutter 2.1), android studio is the same...
Also, when I run "dart fix --dry-run" no warnings are shown:
Computing fixes in project_test (dry run)...
Nothing to fix!

flutter fix is still an early experiment, and can only "fix" things for which it has a before/after mapping for analyzer-reported issues. It will very likely get better over time. Be sure you search the issues list and star any similar issues, or write one of your own so the team knows it's important.

It looks like its a weird issue with dart analyser.
In this particular case only happens if overflow is the only argument and there is a trailing comma.
https://github.com/dart-lang/sdk/issues/45242
I couldn't make it work with other deprecated objects like FlatButton and RaisedButton,
but as Randal Schwartz said flutter fix is still an early experiment

Related

Flutter broken after gitlab commit // Help needed

I'm using the source controle feature in Visual Code to have my Flutter project backed up via Gitlab. About two days ago, suddenly I had Flutter in the list of projects that can be committed/synchronised. I made the mistakte of pressing the button. It did something and then told me there are conflicts merging files.
Now everything is broken, If I try running my project I get a really long list of errors I do not understand (see below). Flutter in source control has loads of red exclamation marks. I'm a beginner and completely out of my depth here. So I dont wan't to touch more things I don't fully understand.
Can anyone give me a hint whow to fix this mess without breakting more things?
Erorr messages:
Blockquote
And a lot more like this below.

Strange Icon Behavior in Android Studio / Flutter

I've noticed a strange behavior in Flutter projects within Android Studio (2020.3.1 Patch 3) on Monterey Mac.
It may apply to more cases than that, I don't know.
Anyway, if inside a dart file, you type
Icons.
["icons dot"]
The auto-complete behavior seems to go into some kind of infinite loop/algorithm gone wrong:
It starts filling in all your icon options, but it does so slowly (as if downloading from the internet on a slow connection), in a nonsensical order (notice the lack of alphabetical order in the screenshot), and basically takes forever as far as I can tell. It makes it impossible to find/choose an Icon.
It does this the same way even if you are offline.
If you delete the dot and re-type it, the whole process starts from the beginning.
If you don't type the dot, you get an instant list of available Icons (as normal without the graphics), but the list is incomplete, truncating even before Icons beginning with B are reached.
It sure seems like a bug, but I'm not sure... and even if it was a bug I don't know where to report it: Android Studio, the Flutter plugin, the Dart plugin, or IntilliJ.
Does anyone have an explanation (answer), or can at least verify the behavior (comment only please)?

problem in flutter widgets not generating fully in vscode

whenever to generate and select widgets for example Text widget it comes incomplete like "Text" instead of "Text()". i have tried to uninstall and reinstall Vscode but it is still doing the same. i am using vscode 1.52.1
It sounds like you're probably using the LSP Preview which didn't have this functionality until recently. If you're using a recent dev build, you should be able to get it back by enabling the dart.completeFunctionCalls setting.
#2823: A new setting dart.completeFunctionCalls will cause code completion on functions/methods to include parentheses and argument placeholders for required arguments.

Filter debug console output in VS code?

Is this feature still not created? I am getting bunch of useless info (e.g. when I test google map I get message every few seconds) and it is very anoying. Android studio has this for standard apps development, not sure about flutter. Do others have problem with this and how do you solve it?
Edit: There is now a filter in VS Code - see comments on this answer.
There is not currently any feature to filter the output in the debug console. It's not expected to fill up how you're describing, though a similar issue has been raised about ads here:
https://github.com/Dart-Code/Dart-Code/issues/1980
I haven't yet managed to figure out why there is so much output - Flutter is filtering the output that's sent to VS Code and the messages in that issue don't seem like they should match the filter. Subscribe to that issue for updates that would probably solve this issue too.
In addition of the 1.49 filter, another interesting Debug console feature is comins with VSCode 1.52 (Nov. 2020)
Debug Console: collapse identical lines
Debug console now collapses identical output by showing the count of how many times it occurred.
This feature should make it much easier to make sense of very repetitive program output.

VS Code cursor jumping to bottom

Why does my cursor jump to the last line of code when I create new tags? For example, when I type a comment in HTML, as soon as I type the !, it jumps to the bottom. What setting do I have to change to prevent this from happening? It is very annoying. I am just starting to use VS Code so sorry if this is a really simple fix.
I had a similar issue. The Flow Language Support extension was causing it. I disabled it, and then the issue was gone.
I had the same issue when I first started using vscode.
Explanation
Generally, the issue is caused by an extension of some sort that is messing with your IDE. Like the extension is trying to do its job but either there is a conflict with other extensions or vscode settings or that's how it works.
More specifically, I found the issue was caused by the the HTML, CSS, JS formatter extension.
Solution
If you have that extension, try disabling it and restart vscode. if the issue is fixed then you may leave it disabled or uninstall it. If it is not solved repeat the process with other extensions, especially those that format your code, until you find the culprit and remove it.
Also i got this type of issue.The solution is just disable your auto save it will work.
If you're an Angular developer, maybe consider disabling Angular Essentials Extension by "John Papa". Then restart VS Code.
That worked for me after several frustrations.