ListView.builder(
shrinkWrap: true,
physics : ClampingScrollPhysics(),
itemBuilder: (_, index) => ListTile(
title: Text("index: $index"),
),
),
ListView - physics에 관한 자세한 설명 : 링크텍스트
@override
Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height;
return NotificationListener<ScrollNotification>(
onNotification: (ScrollNotification notification) {
changePosition(notification);
return true;
},
child: Widget(),
);
}
changePosition(ScrollNotification notification) {
if (isDragInProcess) {
return;
}
setState(() {
if (notification is ScrollUpdateNotification) {
if(notification.metrics.outOfRange){
}else{
}
}
}
);
}