Unable to Extract Widget Android studio - flutter

I am using Android studio chipmunk 2021.2.1 patch 2 for Apple M1 chip ... created a flutter project with patch 1 ... code is working fine but some android studio features not working ...
Flutter Outline shows the source code tree but I am unable to Export any widget nither directly from the editor nor from Eflutter Outline Tab ...
doubleclick on widget tree -> refector -> Extract Flutter Widget ...
Following popup appears but nothing happens on clicking Refactor...
The same thing works fine for the Extract Method...
Flutter Outline shows the code tree but it's also not extracting any Widget...
Only the Export Method button works fine here... it also does not show Wrapping any widget all buttons are disabled ...
The following suggestion bulb is also not showing anything for this project... (This screenshot is from another project)
Unable to rename anything... it shows an error...
This error does not make any sense.
And all things are working fine for the other flutter project I downloaded from Github...
I don't know why this thing happening only for this project and working fine for other projects.

Related

Flutter Navigation DevTools for Debugging?

Is there a quick solution to Navigate through all the Stateful/Stateless widgets in your Flutter project through some sort of menu listing all of them?
It can get quite tedious to make or find a button in your code and write/remove/comment navigation code to quickly debug scenarios.
Is there such a quick navigation feature? I'm using VS Code.
Yes, you should be using Flutter Outline for this kind of stuff it is already available for projects in Android Studio. For VS Code there's a similar plugin which I am linking here. It is called Outline Map.
You can basically see all your widgets in a heirarchial tree formation and even navigate and extract by clicking on them.

New Flutter project Android Studio Demo App counter app or Application template not an option

So I am following this tutorial, which is quite recent, my Android Studio build is from May 16 so not too far off from this vid's upload date: https://youtu.be/CD1Y2DmL5JM?t=531
Notice how the welcome screen looks right at the time the vid starts on the point I linked. But for me, the welcome screen looks like this, why?:
Also, when I click "new flutter project" in the top right, this screen shows up which is different for the vid, why?:
Spent an hour but can't find anything. Now I can create a new flutter project and selected the right location for my flutter and dark SDK, and have both flutter and dart plugins installed. But the option of the standard "Application" template is not a standard option. Looks at the above options, I've tried them all and none are the counter app. In vscode I typed "flutter new project" in global search, and it gave the "Application" template, and running in with the emulator open showed the counter app. But where is the option in Android Studio?
On the left side pane, you actually have to select Flutter, input your SDK location, then click next from the same panel. Don't click next while Dart is selected otherwise you will get the options you see above:
After this it will take you to making a new Flutter project, not a Dart project. Then next to "Project Type:", choose "Application".

dashed-vertical-line child grouping extension in flutter code

I was watching a video about a flutter project in vs code, and I saw that the developer used an extension to group sections of widgets and its childs with a dashed-vertical-line on the left side. Does anyone know what extension is used here?
That is not an extension. This is from VS code settings. Go to settings and search for FLUTTER UI you will get two options as shown in image. Select both option and restart your vs code. You will get broken line tree as you want.

"Widget Tree View" in Android Studio Editor?

I'm using the most current version of Android Studio to develop Flutter Apps/Flutter 2.5.3.
In some projects, I can see the widget tree graphic lines in the editor, but sometimes when creating a new Flutter project it does not appear. And I'm unable to find the option to turn it on. Does anybody know the secret switch?
Thanks
Good editor settings: (see the yellow marked widget tree lines)
Bad editor settings: (no tree view... :-( )
Go to "File/Settings," then search for "Flutter" and enable "Show UI Guides for build methods":

the mistakes that Visual Studio Code shows, are they real?

When developing a flutter app using Visual Studio Code
App freezing errors appear on the phone
And the error appears in a new tab, like the one shown in the picture below
Note that these errors do not appear in the rest of the editors
Like android studio and intellij
Are they mistakes that I should fix or not
thank you
Whenever you debug the flutter code it automatically breakpoint whenever there is some error or chance of future breakdown. If you run the application it will not show error. In visual studio try to run code not debug code. Even if you debug in android studio it will show you those screen.
The error is true
You have put an Expanded (inside a Padding) in a Column, which means the Expanded widget will try to take as much space as possible in a Column widget which will have the height of its childs, making the Column’s height infinite. Try nesting the Column in a SizedBox or Container with height and width