[Bug] suggestionsCallback is not working when onChanged called from textfield
shobith10 opened this issue · comments
Steps to reproduce
- suggestions list is called from api, written in suggestionsCallback and returns List<Map<String, String>> of data
- (pattern) async {
Log.print("msg");
return await HttpHandler
.getSuggestions(pattern);
}, - msg printed only on fist tap
Expected results
later version it was working fine, error occurred when updated, expect calling getSuggestions api while typing on textfield and list called from suggesstionCallBack displayed in sugesstionBox
Actual results
D/InputMethodManager(26836): showSoftInput() view=io.flutter.embedding.android.FlutterView{ec1fe0d VFED..... .F...... 0,0-1080,2400 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT
Package Version
5.1.0
Platform
Android
Code sample
builder: (context, controller,
focusNode) =>
TextFormField(
focusNode: focusNode,
suggestionsCallback: (pattern) async {
Log.print("msg");
return await HttpHandler
.getSuggestions(pattern);
},
itemBuilder: (context,
Map<String, String> suggestion) {
Logs
Logs
[Paste your logs here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Hi,
I do not understand what you are trying to report, nor can I see any unusual behavior in my attempts to reproduce it.
Can you send an example project that shows exactly what you're trying to do, with steps to reproduce?
Best regards.
the controller i assigned in the textfield was another texteditingcontroller , not from builder: (context, controller*, focusNode)
when i assigned controller* issue solved