Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't wrap widget list with new widget assist by Alt+Enter #2448

Closed
petchpool opened this issue Jun 29, 2018 · 41 comments
Closed

Can't wrap widget list with new widget assist by Alt+Enter #2448

petchpool opened this issue Jun 29, 2018 · 41 comments

Comments

@petchpool
Copy link

Use on OSX system.

Steps to Reproduce

  1. Press Alt+Enter on Android Studio.
  2. Nothing appears.
@pq
Copy link
Contributor

pq commented Jun 29, 2018

Hi @wisit-phusi. Thanks for the report.

What version of IDEA and the plugin are you using? How recent is your Flutter? Could you run flutter doctor and paste in the output?

@pq pq added the question label Jun 29, 2018
@pq pq added this to the Backlog milestone Jun 29, 2018
@petchpool
Copy link
Author

petchpool commented Jun 29, 2018

I use IntelliJ IDEA 2018.1.4, Android Studio 3.1.3, Flutter Plugin version 25.0.1 and Dart Plugin version 173.4700.

Flutter Doctor

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale en-TH)
    • Flutter version 0.5.1 at /Users/Wisit/flutter
    • Framework revision c7ea3ca377 (4 weeks ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/Wisit/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.2

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 25.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 24.2.2
    • Dart plugin version 181.4892.1

[✓] VS Code (version 1.24.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.13.2

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

@pq
Copy link
Contributor

pq commented Jun 29, 2018

Thanks!

@wisit-phusi : does it work unreliably or never?

Anything in the error log? (Help > Show Log in Finder)

/cc @scheglov

@pq pq added the bug label Jun 29, 2018
@scheglov
Copy link
Contributor

Do you have an example when it does not work?
I tried it now manually (and we have tests), and it still works.
image

@petchpool
Copy link
Author

petchpool commented Jun 29, 2018 via email

@petchpool
Copy link
Author

@scheglov
This is an example when it does not work.
screen shot 2561-06-30 at 01 06 32

@scheglov
Copy link
Contributor

Do you get any Dart Quick Assists (Alt+Enter) from IDE?

@petchpool
Copy link
Author

petchpool commented Jun 29, 2018 via email

@scheglov
Copy link
Contributor

Sorry, I see that you use Android Studio, but that's not what I asked.
Do you get any Dart specific assists / intentions at all?
I.e. maybe it is not a Flutter wrapping specific problem, but something fundamental with quick assists?

@quangson91
Copy link
Contributor

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE.
disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant.
Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

@petchpool
Copy link
Author

@quangson91
Thanks, I have been able to use it already.

@srinivasPaidisetti
Copy link

thank you very much I had the same issue occurred. So, I followed the above steps u said Then it works fine

@francyfre
Copy link

in Android studio, when i close my widgets... there is no name in last brackets (name of the widget close)... i have suggest when i use alt+enter... so i dont know whats problem is!

thankForHelpMe

@lijie28
Copy link

lijie28 commented Jun 28, 2019

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE.
disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant.
Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

thanks,it really helps

@Kav47
Copy link

Kav47 commented Jan 28, 2020

It happens when you try to wrap a list of widgets like this:

.............
           Expanded(
                child: FlatButton(
                  onPressed: (){
                    playSound(5);
                  },
                  color: Colors.teal,
                ),
              ),
              FlatButton(
                onPressed: (){
                  playSound(6);
                },
                color: Colors.blue,
              ),
............

Here I just wrapped my first FlatButton widget with Expanded, now there is a red color box around my Expanded widget.
image

When I try to wrap my second FlatButton widget by Alt+Enter or Option+ Enter (mac), it will not work as the red box is still around my Expanded widget. In order yo get rid of it press Tab (once or twice-i_f you have a child entry_).

I don't think this is a bug, I guess this is how Android studio works.

**TL;DR: ** This only happens if there is a red box around the newly wrapped Widget. To sort out press Tab (once or twice).

@sokkhimk
Copy link

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE.
disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant.
Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

Thank you for solution. It 's work for me.

@lifeanddeath
Copy link

lifeanddeath commented Apr 25, 2020

Hi everyone, I followed the aforementioned solution, but unfortunately it still doesn't work for me.
The problem with mine is that if i click on the widget, i get a yellow bulb appearing on the left hand side and i can go over with mouse and click on whatever widget I want. But this is extremely time consuming and annoying after a while, so i wanna do it with alt+ enter combination but then i get only suggestions for java. how am i suppose to fix this? could possibly someone help me for gods sake pls?

Screenshot 2020-04-25 at 22 04 12

Screenshot 2020-04-25 at 22 03 50 1

Whoever might have the same problem like I did can solve it by following:

### Solution I found later on: Open keyboard shortcuts menu and search after : Show context Actions, and then assign a key-value to this action :)

@Deepanshu-Rohilla
Copy link

Thank you very much...

@asheshpaul
Copy link

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE.
disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant.
Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

Thank you very much

@mochammadfawwaz
Copy link

image

hey bro i have same problem but in my case im use vscode..
can you help me to fix this?
i cant automatically add "refactor -> wrap with column"

thank youu

@felipecastrosales
Copy link

@ wisit-phusi achei que você pode desativar Dart Quick Assists (Alt+Enter) from IDE.
desabilitar

Para ter certeza, abra a página de configuração do intellij / androidstudio. No tipo de livro de texto de pesquisa assistant.
Em seguida, verifique Editor -> Intentions-> Você deve verificar Quick assist powered by the Dart Analysis Server..

Aqui está a imagem para mais detalhes.

Verifica

@ wisit-phusi achei que você pode desativar Dart Quick Assists (Alt+Enter) from IDE.
desabilitar

Para ter certeza, abra a página de configuração do intellij / androidstudio. No tipo de livro de texto de pesquisa assistant.
Em seguida, verifique Editor -> Intentions-> Você deve verificar Quick assist powered by the Dart Analysis Server..

Aqui está a imagem para mais detalhes.

Verifica

WOW! Thank You!

@SandaliTharuki
Copy link

I'm having a similar issue. When I press ALT + Enter I get other options without "Wrap with a new widget' which I want to use here. Please can someone help me?

@babyguy
Copy link

babyguy commented Oct 29, 2020

@ wisit-phusi Pensé que podrías desactivar Dart Quick Assists (Alt+Enter) from IDE.
inhabilitar

Para asegurarse, abra la página de configuración de intellij / androidstudio. En el tipo de libro de texto de búsqueda assistant.
Luego regístrese Editor -> Intentions-> Debería verificarlo Quick assist powered by the Dart Analysis Server..

Aquí está la captura de pantalla para más detalles.

cheque

Gracias colega tenia mucho tiempo esa duda 👍

@thecodeline
Copy link

From the top navbar click on file -> settings -> intentions then search for ( your desired programming language and then check the option, it should work without restarting android studio

@thecodeline
Copy link

I'm having a similar issue. When I press ALT + Enter I get other options without "Wrap with a new widget' which I want to use here. Please can someone help me?

From the top navbar click on file -> settings -> intentions then search for ( your desired programming language and then check the option, it should work without restarting android studio

@FrenchFries-French
Copy link

Hey guys, seem that I have a similar Problem. I also clicked on Preferences and checked the box "Quick" as mentioned several times but I still only get this, when I press alt + enter:

adjust code style settings

Can someone help me please ?

@ukreddy-erwin
Copy link

image
neither alt+enter also working

@pilotsis
Copy link

@wisit-phusi devre dışı bırakabileceğinizi düşündüm Dart Quick Assists (Alt+Enter) from IDE. devre dışı bırakmak

Emin olmak için lütfen intellij/androidstudio ayar sayfasını açın. Arama metin kitabı türünde assistant. sonra giriş yap Editor -> Intentions-> Kontrol etmelisin Quick assist powered by the Dart Analysis Server..

İşte daha fazla ayrıntı için ekran görüntüsü.

Kontrol

Thank you so mach. I've been dealing wtih problem for two days.

@Amr1440
Copy link

Amr1440 commented Feb 14, 2022

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE. disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant. Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

Tried solution but it didnt work coz it was already clicked

@ZapeeoSheikh
Copy link

I am unable to solve this problem. As the Intentions tab is not shown to my android studio

@ZapeeoSheikh
Copy link

Oh that's great my problem has been solved now
let me share my problem and their solution: I was unable to find my intention in the search of " assistant "
solution go to file > setting > search [ type "int" and press search } > intentions > check the box of " dart "

Done

@Nguyen-Duc-Hoa
Copy link

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE. disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant. Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

thanks, it worked

@KartikPatadiya
Copy link

@quangson91 Thank You So much

@Qikcasual
Copy link

Qikcasual commented Dec 7, 2022

@quangson91 bro very very thanks full to you!! because, i am new on Android development!! i am struggled on this so many days!!! now problem solved!!!

@almasud
Copy link

almasud commented Sep 5, 2023

@wisit-phusi I thought you may disable Dart Quick Assists (Alt+Enter) from IDE. disable

To make sure, please open intellij/androidstudio setting page. In search text book type assistant. Then check in Editor -> Intentions -> You should checked Quick assist powered by the Dart Analysis Server..

Here is the screenshot for more detail.

check

I have the same issue even though the Quick assist powered by the Dart Analysis Server is already enabled on my Android Studio Giraffe | 2022.3.1 Patch 1 for MacOS !

@Zeeshan-H
Copy link

Same problem for me too. Even i am using Android Studio Giraffe and visual studio code too but flutter refactorings not working. For instance i can't wrap a widget.

@ghost
Copy link

ghost commented Feb 13, 2024

In my case, I uninstalled this plugin and now my alt + enter works fine.
Plugin : Bloc , Clean architecture
Screenshot 2024-02-13 at 12 26 25 ### PM

@tmunier
Copy link

tmunier commented Mar 14, 2024

The solution for me was the shortcut "command" + "." (Mac)

@IanMurnane
Copy link

If you can't see File -> Settings -> Intentions, use the search bar

I had to disable quick assist, apply, click reset, re-enable, apply, ok.. then it started working!

@travisbikkle
Copy link

In my case, I used riverpod lint,
after remove it from analysis_options.yaml, problem solved. Hope it helps.

before:
image

image

after:

image

@MohammedAttia3104
Copy link

In my case, I uninstalled this plugin and now my alt + enter works fine. Plugin : Bloc , Clean architecture Screenshot 2024-02-13 at 12 26 25 ### PM

yes the clean architecture is the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests