scrollController.jumpTo()
Closed this issue · 3 comments
Thank you for this project..
Is it possible to move to a designated location like a scrollerController.jumpTo() in flutter?
solved this problem.
Hi, how did you achieve jumping to an exactly index or position? can you share some code please :D
ScrollController? scrollController;
inside builder :
scrollController = ScrollController(
initialScrollOffset: 500.0, // 초기 스크롤 위치는 100에서 시작
keepScrollOffset: true,
// 페이지 이동 시 현재 스크롤 위치 유지
)..addListener(scrollmessage);
DaviTheme(
data: DaviThemeData(
header: HeaderThemeData(
color: Color.fromRGBO(166, 161, 161, 0.098),
bottomBorderHeight: 1,
bottomBorderColor: Colors.grey,
),
cell: const CellThemeData(contentHeight: 20),
row: RowThemeData(
hoverBackground: (rowIndex) => Colors.blue[50]
),
),
child: Davi(
controller.model,
verticalScrollController: scrollController,
));
at widget init :
scrollController!
.jumpTo(scrollController!.position.maxScrollExtent / 2); // goto center