Created
February 5, 2020 07:07
-
-
Save kitoko552/f9f7bf95baab0d1a1fdc6e27ea9e25e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final controller = ItemScrollController(); | |
final listener = ItemPositionsListener.create(); | |
ScrollablePositionedList.builder( | |
itemCount: _maxItemCount, | |
itemScrollController: controller, | |
itemPositionsListener: listener, // ItemPositionsListenerでスクロールを監視 | |
itemBuilder: (context, index) { | |
return child; | |
}, | |
); | |
// スクロール処理 | |
controller.jumpTo(index: index); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment