Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  • Flutter Plugin: v35.2.1

  • Dart Plugin: v183.6270

Android Studio

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

Ctrl + . in VS Code

  • Flutter Plugin: v.2.26.1

  • Dart Plugin: v2.26.1

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?

like image 722
andras Avatar asked May 05 '19 08:05

andras


1 Answers

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.

like image 100
andras Avatar answered Oct 19 '22 22:10

andras