flutter_typeahead
flutter_typeahead copied to clipboard
Bugfix - blinking loadingBuilder
I have blinking loadingBuilder when change focus. Solution - flag isLoading:
suggestionsCallback: (String pattern) async {
_isLoading = true;
try {
final data = await _load(pattern);
return data;
} finally {
_isLoading = false;
}
},
loadingBuilder: (BuildContext context) {
if (!_isLoading) return null; // !!!
return Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: CircularProgressIndicator(),
),
);
},
Thank you ! I had just noticed this problem while scrolling
I confirm the the issue is existing v1.8.1 , v1.8.3 and not existing in 1.8.0
hello, is there a way to fix this issue? also got this in flutter 1.17.1 stable and plugin version 1.8.5
v1.8.5 same issue
loadingBuilder: (context) => null, add this fixed the issue for me
@yuechaor , well done finding this.
I'm still seeing this error where LoadingBuilder is called before onSuggestionSelected during initial focus.