Created
February 5, 2020 07:05
-
-
Save kitoko552/a66a2d8b69ce482bfc50d0ee4e0114c7 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 = AutoScrollController(); | |
ListView.builder( | |
controller: controller, | |
itemCount: _maxItemCount, | |
itemBuilder: (context, index) { | |
return AutoScrollTag( | |
key: ValueKey(index), | |
controller: controller, | |
index: index, | |
child: child, | |
); | |
}, | |
); | |
// スクロール処理 | |
controller.scrollToIndex( | |
index, | |
preferPosition: AutoScrollPosition.begin, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment