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