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

Code suggestion for setState still not working in Flutter 3.0.2 #49233

Closed
keybow007 opened this issue Jun 10, 2022 · 15 comments
Closed

Code suggestion for setState still not working in Flutter 3.0.2 #49233

keybow007 opened this issue Jun 10, 2022 · 15 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@keybow007
Copy link

I tried Flutter 3.0.2 after receiving an announcement that the code completion problem has been resolved in Flutter 3.0.2.

initState and dispose did code completion properly.

(initState / dispose in Flutter 3.0.2)
スクリーンショット 2022-06-11 x5 33 05

Unfortunately, however, code completion for setState does not seem to work yet.

(setState in Flutter 3.0.2 => no suggestion)
スクリーンショット 2022-06-11 5 33 39

(setState in Flutter 2.10.5 => work properly)
スクリーンショット 2022-06-11 5 41 20

Since setState is a very commonly used and important method, it would be helpful if it could be resolved as soon as possible.

Thanks.

@bwilkerson bwilkerson added the P2 A bug or feature request we're likely to work on label Jun 10, 2022
@bwilkerson
Copy link
Member

@scheglov @stevemessick

@vsmenon vsmenon added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jun 11, 2022
@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Jun 13, 2022
Bug: #49233
Change-Id: I74fd86fc7f49c932e6698e474842078ff823f3cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247933
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
@serendipity1004
Copy link

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  freezed_annotation: ^2.0.3

dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  build_runner: ^2.1.11
  freezed: ^2.0.3+1
  json_serializable: ^6.2.

with above dependencies, material.dart auto completion does not work also.

Screen Shot 2022-06-13 at 4 50 32 PM

@cocoa-rum
Copy link

изображение

Also lack of suggestions like EdgeInsets

@scheglov
Copy link
Contributor

@cocoa-rum please open separate issue. It is fine if you reference it here, but for tracking and discussing it is much easier for us to keep separate root problems separately.

@xshiwei
Copy link

xshiwei commented Jun 22, 2022

+1

@xshiwei
Copy link

xshiwei commented Jun 22, 2022

I also had the same problem

@keybow007
Copy link
Author

It seems that Flutter 3.0.3, which was just released, has not solved it.

スクリーンショット 2022-06-24 8 58 10

@scheglov
Copy link
Contributor

We are waiting for #49239

@dhola-hardik
Copy link

Same problem.

@khanahsan
Copy link

khanahsan commented Jun 30, 2022

Code suggestion for async/dispose/setState no longer works in Flutter 3.0.2 #106724
i'm still face this issue in Android Studio i use dart 2.17.3 version

@keybow007
Copy link
Author

still not working in Flutter 3.0.4

スクリーンショット 2022-07-02 6 21 38

@keybow007
Copy link
Author

Worked in Flutter 3.0.5! Thanks!

スクリーンショット 2022-07-14 15 24 54

@johnpryan
Copy link
Contributor

Can we close this issue?

@stevemessick
Copy link
Contributor

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests