Skip to content

Fix RefreshIndicatorMode.error #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

comerc
Copy link

@comerc comerc commented Jul 2, 2020

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

@zmtzawqlp
Copy link
Member

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

@comerc
Copy link
Author

comerc commented Jul 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants