flutter-draggable-scrollbar
flutter-draggable-scrollbar copied to clipboard
Fix scrollthumb shrinking when vertical padding provided
When vertical padding is provided to the scrollbar, scroll thumb shrinks on reaching the end of scroll. This happens because barMaxScrollExtent
doesn't count vertical padding provided to the widget.
My fix changes this behavior by subtracting widget.padding?.vertical
in barMaxScrollExtent
.
Demonstration with:
DraggableScrollbar.arrows(
padding: EdgeInsets.only(bottom: 100),
child: ListView(
padding: EdgeInsets.only(bottom: 100),
...
Before:
After: