vs_scrollbar 0.1.1 vs_scrollbar: ^0.1.1 copied to clipboard
Customizable ScrollBar that can be dragged for quick navigation supporting both Horizontal and Vertical list.
vs_scrollbar #
Customizable ScrollBar that can be dragged for quick navigation supporting both Horizontal and Vertical list.
You can adjust scrollbar's thickness
, radius
, set custom colors
and handle support for list drag functionality with prebuilt methods of default ScrollBar for Flutter.
Control animation duration of scrollbar using scrollbarTimeToFade, scrollbarFadeDuration properties.
Wrap This ScrollBar to any ScrollableList.
SingleChildScrollView
ListView
Listview.builder
Example #
Try out example code all parameters are optional, currently serving basic use case scenarios.
Horizontal List #
Vertical List #
Code #
// use same scrollController object to listview and scrollbar to support drag functionality
ScrollController _scrollController = ScrollController();
VsScrollbar(
controller: _scrollController,
allowDrag: true, // allows to scroll the list using scrollbar [default : true]
color: Colors.purple[900], // sets color of vsScrollBar
radius: 50, // sets radius of vsScrollBar
thickness: 8, // sets thickness of vsScrollBar
isAlwaysShown: true, // default false
// sets scrollbar fade duration [ Default : Duration(milliseconds: 300)]
scrollbarFadeDuration: Duration(milliseconds:500),
// sets scrollbar fade duration [ Default : Duration(milliseconds: 600)]
scrollbarTimeToFade: Duration(milliseconds:800),
child: ListView.builder(
controller: _scrollController,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemCount: 6,
itemBuilder: (BuildContext context, int index) {
return Container(
height: 100,
width: MediaQuery.of(context).size.width,
color: Colors.purple[900],
margin: EdgeInsets.all(15));
},
),
)
Show some ❤️ and star the repo. #
❤️ Found this project useful? #
If you found this project useful, then please consider giving it a ⭐ on Github and sharing it with your friends via social media.