pull_to_refresh_notification
pull_to_refresh_notification copied to clipboard
Fix RefreshIndicatorMode.error
If I have some tabs, all tabs does not work after first refresh with _refreshIndicatorMode = RefreshIndicatorMode.error;
It seems it's breaking change? any demo for this issue?
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
: