skip to Main Content

We got another problem. When we type init it does not show initState method in possible match list. In fact it doesn’t show any matching list.
MyCode
Tutorial
Inside a statefulWidget if we typed the keyword "set" a list of possible match shows up. In the list there was a method named setState((){}) to trigger rebuild to update UI on user interaction.
But recent Chipmunk version of android studio doesn’t show the setState((){}) method in the possible match list. Any idea? [ If duplicate, let us know ]Screenshot

4

Answers


  1. Try this: File -> Invalidate Caches / Restart...

    Login or Signup to reply.
  2. Clean your cache of Android Studio

    Go to File -> Invalidate Caches / Restart

    Login or Signup to reply.
  3. See, that error happens quite a few times, and the best way is to remember the syntax.

    I’d suggest you complete the syntax yourself and see flutter recognize it.
    moreover, you can run flutter clean and flutter build in terminal, and invalidate caches from the files group.

    Upvote if it helps.

    Login or Signup to reply.
  4. This apparently it is a change in the version of Android Studio (if you are working with Android Studio, by the way, neither setState nor initState nor several other methods work.

    My current version of Android Studio is as follows

    enter image description here

    I did the downgrade and now everything works correctly. I would recommend using the version. Android Studio Arctic Fox (2020.3.1) Patch 2 You can find it in this link

    Rolling back to the version of Android Studio Artic Fox, which was the one in which everything worked correctly before, maybe an older and more stable version also solved it too.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search