Skip to content
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

当Easyrefresh在父组件为TabBar的时候, 并且TabBar是多个, 可滚动的条件下, 点击相差三四个tab的情况下会报错 #302

Closed
Zipper-Code opened this issue May 28, 2020 · 2 comments

Comments

@Zipper-Code
Copy link

════════ Exception caught by scheduler library ═════════════════════════════════════════════════════
The following NoSuchMethodError was thrown during a scheduler callback:
The method 'dependOnInheritedWidgetOfExactType' was called on null.
Receiver: null
Tried calling: dependOnInheritedWidgetOfExactType()

When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 PrimaryScrollController.of (package:flutter/src/widgets/primary_scroll_controller.dart:49:52)
#2 _EasyRefreshState._scrollerController (package:flutter_easyrefresh/src/refresher.dart:241:33)
#3 _EasyRefreshState.callRefresh (package:flutter_easyrefresh/src/refresher.dart:306:9)
#4 _EasyRefreshState.initState. (package:flutter_easyrefresh/src/refresher.dart:275:9)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

@xuelongqy
Copy link
Owner

为每个EasyRefresh设置不同的ScrollController即可,最好做一下Tab页保活,在回调中判断一下生命周期

@Zipper-Code
Copy link
Author

为每个EasyRefresh设置不同的ScrollController即可,最好做一下Tab页保活,在回调中判断一下生命周期

谢谢

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

No branches or pull requests

2 participants