scrollsExtreme function
scrolls to extreme top or bottom using ScrollController
Implementation
void scrollsExtreme({
required ScrollController scrollController,
bool scrollToTop = false,
}) {
scrollController.animateTo(
scrollToTop == true
? scrollController.position.minScrollExtent
: scrollController.position.maxScrollExtent,
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
);
}