pull_to_refresh_notification icon indicating copy to clipboard operation
pull_to_refresh_notification copied to clipboard

Fix RefreshIndicatorMode.error

Open comerc opened this issue 4 years ago • 2 comments

If I have some tabs, all tabs does not work after first refresh with _refreshIndicatorMode = RefreshIndicatorMode.error;

comerc avatar Jul 02 '20 11:07 comerc

It seems it's breaking change? any demo for this issue?

zmtzawqlp avatar Jul 03 '20 01:07 zmtzawqlp

Yes! it's breaking change.

For example, if exception by timeout, then loadData return false:

class ItemsRepository extends LoadingMoreBase<ItemModel> {
  // ...
  @override
  Future<bool> loadData([bool isLoadMoreAction = false]) async {
    bool isSuccess = false;
    try {
      // ...
      final result = await client.query(options).timeout(Duration(
          milliseconds: _isHandleRefresh ? 10 : kGraphQLQueryTimeout));
      // ...
      isSuccess = true;
    } catch (exception, stack) {
      isSuccess = false;
      print(exception);
      print(stack);
    }
    return isSuccess;
  }

In this case, I need _dismiss(RefreshIndicatorMode.canceled); (please see my pull request).

But now, I see freezed refreshWiget:

Снимок экрана от 2020-07-08 16-44-52

comerc avatar Jul 08 '20 13:07 comerc