scrollToMin method
Implementation
Future scrollToMin(ScrollController controller) async {
if (controller.position.pixels == controller.position.minScrollExtent) {
return;
}
log(controller.position.extentBefore.toString());
await controller.animateTo(
controller.position.pixels - controller.position.extentBefore,
duration: Duration(
milliseconds: (int.parse(controller.position.extentBefore
.toString()
.substring(0, 3)
.split('.')
.first))),
curve: Curves.linear,
);
scrollToMin(controller);
}