I installed Flutter and Android Studio. I ran flutter doctor - Flutter doctor
I have the Dart plugin installed - v191.8593.
When I press Ctrl + Space at a very obvious place the AutoComplete do not suggest the right suggestions. Example:
View animation here
As you see the first suggestion are not of type ScrollPhysics and are out of context, and after I scroll down, there are ScrollPhysics suggestions, but they are after some scrolling.
It shows how to autocomplete will work in your flutter applications. It shows when users tap on textfield then will show down some suggestions and yow will also pick up those suggestions. It will be shown on your device.
I have the Dart plugin installed - v191.8593. When I press Ctrl + Space at a very obvious place the AutoComplete do not suggest the right suggestions. Example: As you see the first suggestion are not of type ScrollPhysics and are out of context, and after I scroll down, there are ScrollPhysics suggestions, but they are after some scrolling.
Likewise, the Autocomplete widget should be advised when the client chooses an option. To tell the Autocomplete widget, call the AutocompleteOnSelected function and pass the selected item as the contention. The beneath model makes a custom view for the options by making a ListView wrapped as the child of a Container.
It will be shown on your device. To utilize Autocomplete, you need to call the constructor underneath: The Autocomplete class itself has a generic kind T expands Object. That implies the choice item can be any kind of object, not a string. > key: The widget's key, used to control how a widget is replaced with another widget.
This problem can be fixed by one of the following
File-> Ivalidate caches / Restart -> Invalidate and Restart
Note all above solutions works but are not permanent as it appears there is bug in latest dart Analysis server you can follow subscribe to this reported issue for more updates
Restart Dart Analysis Server :-
If it does not work, try this :-
flutter pub get
In my case, I run in android studio terminal:
flutter upgrade
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With