Thanks for the video, it helped me a lot, but I have a question how I can bring the value of a user's id to be able to save it in a database, in the form I only need the id. Please I need help thank you very much, sorry for my English, I speak Spanish.
Sir, I have used autocomplete in a flutter. it's working properly but I have more than 100000 (lakh) records in the table. in autocomplete the whole table first loading and then get ready for searching, it takes to much time to load and populated in the textbox. I want to show the result bases on entering a value in realtime means when users entering the word it should be getting from the table, not from the autocomplete stored data. Thanks
I have a question, how can I show a snackbar or message that says "No matches found" instead of showing nothing when, after completing the field nothing is got by the query because no data matches with the search. Great video it all works
Hey, thanks for tutorial. But I have one problem. Suggestions doesnt show on first tap. But when I tap it second time its working okay. Do you know what could be problem?
I am facing two issues after implement this. 1. AutoCompleteTextField is rebuilding the widget where i am using futureBuilder 2. setState() called after dispose(): AutoCompleteTextFieldState#c00c1(lifecycle state: defunct, not mounted) In my case, i am loading some categories in dropdown then searching items.
@@MobileProgrammer And you're awesome at it! Do you happen to know how we can access the void removeSuggestion(T suggestion) so that user can remove one of the suggestions if he doesn't want it to be saved (could be private information). I have successfully added that functionality, but it only updates the list if the user updates the page (like if he leaves and then comes back)
(Basically, I added an IconButton to a trailing ListTile (the list of suggestions are ListTiles) and I just wanted the suggestion list to update and show the new list without the removed suggestion)
If anyone also wants to do it, I figured it out. To access the functions of the widget of which you're settings properties to, you use "key.currentState" so in this case the solution was to simply add the following to the onPressed: key.currentState.removeSuggestion(suggestion);
Thanks for the tutorial, I am facing an issue while selecting an item, selected item is not showing in textfied, it is showing Instance of Dist(Dist is my model). I have a different scenario, I am getting district list from db which is a Future, i have made some changes and used FutureBuilder for mapping data. Every thing is working as expected except the point i have mentioned. I don't know where i am mistaking. Any idea bro?
Sandeep, I believe you are on the right path, on clicking the list you got the right object you are clicking on...correct? Now you can cast that object to your Dist Object and extract properties from that object, like dist.place etc.... Hope that answers your question.
@@MobileProgrammer Thanks for your valuable response, here is code sample itemSubmitted: (item) { setState( () { searchTextField.textField.controller.text = item.StateId.toString(); }, ); }, but one thing i have noticed that if do not write this property then also result remains same, my whole process is stuck just because of this issue.. While running i am getting following error- The following assertion was thrown building FutureBuilder(dirty, state: I/flutter ( 489): _FutureBuilderState#e417b): I/flutter ( 489): A build function returned null. I/flutter ( 489): The offending widget is: FutureBuilder Please help...
That's a great tutorial. however, I'm getting error here. Error: Could not resolve the package 'autocomplete_textfield' in 'package:autocomplete_textfield/autocomplete_textfield.dart'. I don't know what's happening, I run pub get and nothing happens.
sir. thank you for your tutorial. but i found when i try to create a UI for autocomplete under ROW it show error!. but if not under row or coloumn it work. please your help.
@@MobileProgrammer Like below : I/flutter ( 3409): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter ( 3409): The following assertion was thrown during performLayout(): I/flutter ( 3409): BoxConstraints forces an infinite width. I/flutter ( 3409): These invalid constraints were provided to RenderAnimatedOpacity's layout() function by the I/flutter ( 3409): following function, which probably computed the invalid constraints in question: I/flutter ( 3409): _RenderDecoration._layout.layoutLineBox (package:flutter/src/material/input_decorator.dart:815:11) I/flutter ( 3409): The offending constraints were:
It is my error thank you for help! I/flutter (31783): ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════ I/flutter (31783): The following NoSuchMethodError was thrown while dispatching notifications for FocusNode: I/flutter (31783): The method 'call' was called on null. I/flutter (31783): Receiver: null I/flutter (31783): Tried calling: call(true) I/flutter (31783): I/flutter (31783): When the exception was thrown, this was the stack: I/flutter (31783): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5) I/flutter (31783): #1 new AutoCompleteTextFieldState. (package:autocomplete_textfield/autocomplete_textfield.dart:182:4) I/flutter (31783): #2 ChangeNotifier.notifyListeners package:flutter/…/foundation/change_notifier.dart:206 I/flutter (31783): #3 FocusNode._notify package:flutter/…/widgets/focus_manager.dart:103 I/flutter (31783): #4 FocusManager._update package:flutter/…/widgets/focus_manager.dart:474 I/flutter (31783): (elided 10 frames from package dart:async) I/flutter (31783): I/flutter (31783): The FocusNode sending notification was: I/flutter (31783): FocusNode#9de50(FOCUSED) I/flutter (31783): ════════════════════════════════════════════════════════════════════════════════════════════════════
Awesome, saved me some cold sweat and deadline anxiety :)) Thank you!
Thanks for the video, it helped me a lot, but I have a question how I can bring the value of a user's id to be able to save it in a database, in the form I only need the id. Please I need help thank you very much, sorry for my English, I speak Spanish.
Glad to see you're enjoying it.
Great 👌
Perfect tutorial. Thanks. :)
Great Vedio Sir,
Thank you
Sir,
I have used autocomplete in a flutter. it's working properly but I have more than 100000 (lakh) records in the table. in autocomplete the whole table first loading and then get ready for searching, it takes to much time to load and populated in the textbox. I want to show the result bases on entering a value in realtime means when users entering the word it should be getting from the table, not from the autocomplete stored data. Thanks
I have a question, how can I show a snackbar or message that says "No matches found" instead of showing nothing when, after completing the field nothing is got by the query because no data matches with the search. Great video it all works
Use the snack bar widget
Great stuff
Hey, thanks for tutorial. But I have one problem. Suggestions doesnt show on first tap. But when I tap it second time its working okay. Do you know what could be problem?
Thank you! You are very cool
Hi thank you for your video, but I have a problem. I'm doing all things like you and have error and can't understand why it didn't work
I am facing two issues after implement this.
1. AutoCompleteTextField is rebuilding the widget where i am using futureBuilder
2. setState() called after dispose(): AutoCompleteTextFieldState#c00c1(lifecycle state: defunct, not mounted)
In my case, i am loading some categories in dropdown then searching items.
THANK YOU! You saved me!
That’s my job. 😀
@@MobileProgrammer And you're awesome at it! Do you happen to know how we can access the void removeSuggestion(T suggestion) so that user can remove one of the suggestions if he doesn't want it to be saved (could be private information).
I have successfully added that functionality, but it only updates the list if the user updates the page (like if he leaves and then comes back)
(Basically, I added an IconButton to a trailing ListTile (the list of suggestions are ListTiles) and I just wanted the suggestion list to update and show the new list without the removed suggestion)
If anyone also wants to do it, I figured it out. To access the functions of the widget of which you're settings properties to, you use "key.currentState" so in this case the solution was to simply add the following to the onPressed: key.currentState.removeSuggestion(suggestion);
Thanks for the tutorial, I am facing an issue while selecting an item, selected item is not showing in textfied, it is showing Instance of Dist(Dist is my model).
I have a different scenario, I am getting district list from db which is a Future, i have made some changes and used FutureBuilder for mapping data. Every thing is working as expected except the point i have mentioned. I don't know where i am mistaking. Any idea bro?
Sandeep, I believe you are on the right path, on clicking the list you got the right object you are clicking on...correct? Now you can cast that object to your Dist Object and extract properties from that object, like dist.place etc.... Hope that answers your question.
@@MobileProgrammer Thanks for your valuable response, here is code sample itemSubmitted: (item) {
setState(
() {
searchTextField.textField.controller.text =
item.StateId.toString();
},
);
},
but one thing i have noticed that if do not write this property then also result remains same, my whole process is stuck just because of this issue..
While running i am getting following error-
The following assertion was thrown building FutureBuilder(dirty, state:
I/flutter ( 489): _FutureBuilderState#e417b):
I/flutter ( 489): A build function returned null.
I/flutter ( 489): The offending widget is: FutureBuilder
Please help...
@Er. Sandeep Singh Sidhu Is it possible to send that code with sample data to coderzheaven@gmail.com, then I can take a look.
Bro i have fixed the issue, Thanks a lot for wonderful tutorial,
@@er.sandeepsinghsidhu1419 Great Sandeep. Keep in touch. Thanks
Hello, how i can set "enableInteractiveSelection: false" on TextField in the AutoCompleteTextField?
I got error please help
NoSuchMethodError: Class '_InternalLinkedHashMap' has no instance method 'cast' with matching arguments.
Can we build Call Recorder program with Flutter?
You can build if the underlying platform allows it.
thank you so much :-)
You are welcome.
@@MobileProgrammer thank you... you saved my a.....
That's a great tutorial. however, I'm getting error here.
Error: Could not resolve the package 'autocomplete_textfield' in 'package:autocomplete_textfield/autocomplete_textfield.dart'.
I don't know what's happening, I run pub get and nothing happens.
So you ran flutter packages get and you didn’t get an exit 0 message in console?
@@MobileProgrammer it worked! Thanks!
how do you display the name in a textfield or text under the search
sir. thank you for your tutorial. but i found when i try to create a UI for autocomplete under ROW it show error!.
but if not under row or coloumn it work.
please your help.
Hi Kart, what is the error you are getting?
@@MobileProgrammer
Like below :
I/flutter ( 3409): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 3409): The following assertion was thrown during performLayout():
I/flutter ( 3409): BoxConstraints forces an infinite width.
I/flutter ( 3409): These invalid constraints were provided to RenderAnimatedOpacity's layout() function by the
I/flutter ( 3409): following function, which probably computed the invalid constraints in question:
I/flutter ( 3409): _RenderDecoration._layout.layoutLineBox (package:flutter/src/material/input_decorator.dart:815:11)
I/flutter ( 3409): The offending constraints were:
@@kartzhai can you send the sample code to coderzheaven@gmail.com. Did u try restarting the app?
I put UI for AutoTextfield under Body : Row( autotextfield UI Code )
@@kartzhai Okay. Let me try that.
After selecting the suggested item, the text gets the name i selected but the suggestions still appear instead of closing. Can you help me
It shouldn’t happen ... need to investigate.
@@MobileProgrammer shall i share the code?
Sure
@@MobileProgrammer check this hastebin.com/fenanihixe.coffeescript
@@MobileProgrammer I get this " Another exception was thrown: NoSuchMethodError: The method '*' was called on null"
but how can we get data from this AutoCompleteTextField?
Use searchTextField.textField.controller.text
how implement radius to AutoCompleteTextField?
how implement text onChanged to searchTextField?
I answer my self:
String currentText;
textChanged: (text) => print(currentText = text)
how to do this with a local json?
You can add it to the project assets and load as a normal file
It is my error thank you for help!
I/flutter (31783): ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
I/flutter (31783): The following NoSuchMethodError was thrown while dispatching notifications for FocusNode:
I/flutter (31783): The method 'call' was called on null.
I/flutter (31783): Receiver: null
I/flutter (31783): Tried calling: call(true)
I/flutter (31783):
I/flutter (31783): When the exception was thrown, this was the stack:
I/flutter (31783): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
I/flutter (31783): #1 new AutoCompleteTextFieldState. (package:autocomplete_textfield/autocomplete_textfield.dart:182:4)
I/flutter (31783): #2 ChangeNotifier.notifyListeners
package:flutter/…/foundation/change_notifier.dart:206
I/flutter (31783): #3 FocusNode._notify
package:flutter/…/widgets/focus_manager.dart:103
I/flutter (31783): #4 FocusManager._update
package:flutter/…/widgets/focus_manager.dart:474
I/flutter (31783): (elided 10 frames from package dart:async)
I/flutter (31783):
I/flutter (31783): The FocusNode sending notification was:
I/flutter (31783): FocusNode#9de50(FOCUSED)
I/flutter (31783): ════════════════════════════════════════════════════════════════════════════════════════════════════
Did u try rebuilding the app?
Yes, i did
Please try updating flutter and get the latest library. Clean the build . Delete app from device and try
Okay i will try. Thanks for fast feedback 👍
You are always welcome.