andras
andras

Reputation: 3645

Flutter/Dart autocomplete works in VS Code, but not in Android Studio

I thought AS was the one primary supported environment when it comes to develop, so this is really unusual.

Alt + Enter in Android Studio

Android Studio

The very same project opened in VS Code, after reading this.

Ctrl + . in VS Code

enter image description here

Flutter:

flutter --version

Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (3 months ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

WHY IS THAT?

Upvotes: 8

Views: 14329

Answers (4)

Ramy Wahid
Ramy Wahid

Reputation: 443

You can also try this. Go to Preferences >> Editor >> General >> Code Completion

Change (show the parameter info popup in 200 ms instead of 1000 ms ) also (show the documentation popup in 200. ms instead of 1000 ms )

This helps to make work faster and you can check other settings on this page

enter image description here

Upvotes: 0

Ahmed Elassar
Ahmed Elassar

Reputation: 48

From the navbar click on file -> settings -> intentions then search for dart check the option {Quick assist }

Upvotes: 2

NullByte08
NullByte08

Reputation: 1032

Auto-complete is now available in Android studio also. If it is doesn't work for you, go to File->Power Save Mode and disable it.

Source: https://github.com/flutter/flutter-intellij/issues/3456#issuecomment-593689793_

Upvotes: 3

andras
andras

Reputation: 3645

This question was answered on Github.

Android Studio has an older version of the Dart plugin (183.6270) than IntelliJ (191.7019). That newer Dart plugin supports the feature of the analysis server that shows completions for symbols that are not in scope. If you select one of these symbols, your imports will be updated for you automatically.

As Android Studio revs, and moves to a version of the IntelliJ platforms that supports the new Dart plugin, Android Studio will get this feature as well.

Tldr: IntelliJ and VS Code have more up-to-date versions than Android Studio.

Upvotes: 2

Related Questions