wrapByAutoScroll function
wrap widget by AutoScrollTag
that can use AutoScrollController
to scrollToIndex
Implementation
Widget wrapByAutoScroll(
int index, Widget child, AutoScrollController controller) {
return AutoScrollTag(
key: Key(index.toString()),
controller: controller,
index: index,
child: child,
// highlightColor: Colors.black.withAlpha(255 / 0.1),
highlightColor: Colors.black.withValues(alpha: 0.1),
);
}