flutter_typeahead icon indicating copy to clipboard operation
flutter_typeahead copied to clipboard

Bugfix - blinking loadingBuilder

Open comerc opened this issue 4 years ago • 7 comments

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(),
          ),
        );
      },

comerc avatar Jun 16 '20 03:06 comerc

Thank you ! I had just noticed this problem while scrolling

m

loicsacre avatar Jun 18 '20 11:06 loicsacre

I confirm the the issue is existing v1.8.1 , v1.8.3 and not existing in 1.8.0

dahabit avatar Jun 26 '20 14:06 dahabit

hello, is there a way to fix this issue? also got this in flutter 1.17.1 stable and plugin version 1.8.5

ethel39 avatar Jul 04 '20 08:07 ethel39

v1.8.5 same issue

yuechaor avatar Jul 09 '20 11:07 yuechaor

loadingBuilder: (context) => null, add this fixed the issue for me

yuechaor avatar Jul 09 '20 11:07 yuechaor

@yuechaor , well done finding this.

AlexBacich avatar Jul 28 '20 14:07 AlexBacich

I'm still seeing this error where LoadingBuilder is called before onSuggestionSelected during initial focus.

CosmicPangolin avatar Nov 25 '21 23:11 CosmicPangolin