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

example4, loadmore 会触发多次,加载完成后 “加载中不消失” #8

Closed
zhangjianlin77 opened this issue Sep 5, 2018 · 2 comments

Comments

@zhangjianlin77
Copy link

环境如下
[✓] Flutter (Channel master, v0.7.0, on Mac OS X 10.12.6 16G29, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc1)
[!] iOS toolchain - develop for iOS devices (Xcode 9.2)
✗ libimobiledevice and ideviceinstaller are not installed. To install, run:
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew install ios-deploy
! CocoaPods out of date (1.5.0 is recommended).
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To upgrade:
brew upgrade cocoapods
pod setup
[✓] Android Studio (version 2.3)
✗ Flutter plugin version 12.1 - the recommended minimum version is 16.0.0
[!] VS Code (version 1.26.1)
[✓] Connected devices (1 available)

example4加载更多有几个bug

! Doctor found issues in 2 categories.

@zhangjianlin77
Copy link
Author

zhangjianlin77 commented Sep 6, 2018

加个这样的可以解决 上滑也会触发 loadmore问题

//check user is pulling up
bool _isPullUp(ScrollNotification noti) {
print("_isPullUp $noti");
return noti.metrics.extentBefore == 0.0 &&
noti.metrics.pixels < 0;
}

//check user is pulling down
bool _isPullDown(ScrollNotification noti) {
print("_isPullUp $noti");
return noti.metrics.extentAfter == 0.0 &&
noti.metrics.pixels > 0;
}

@nanchaodong
Copy link

bool _isPullUp(ScrollNotification noti) {
print("_isPullUp $noti");
return noti.metrics.extentBefore == 0.0 &&
noti.metrics.pixels < 0;
}

ScrollNotification 从哪里来的

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

3 participants