fluttercommunity / flutter-draggable-scrollbar

Draggable Scrollbar - A scrollbar that can be dragged for quickly navigation through a vertical list. Additional option is showing label next to scrollthumb with information about current item. Maintainer: @marica27
https://pub.dev/packages/draggable_scrollbar
MIT License
442 stars 77 forks source link

DraggableScrollbar for ListView Inside SingleChildScrollView #46

Open SivaramSS opened 3 years ago

SivaramSS commented 3 years ago

Using DraggableScrollBar for ListView (with width 1000) inside Horizontal SingleChildScrollBarView, the scrollbar appears only after scrolling horizontally to the end of list.

    SingleChildScrollView(
          scrollDirection: Axis.horizontal,
          controller: _horizontalScrollController,
          child: SizedBox(
            width: BaseViewDataWidget.of(context).getWidth(),
            child: DraggableScrollbar.semicircle(
              controller: _listViewVerticalController,
              child: ListView.builder(
                  itemCount: globals.recordCount,
                  itemExtent: 100,
                  controller: _listViewVerticalController,
                  itemBuilder: (context, index) {
                    return RecordWidget(index, offsetStream, _horizontalScrollController);
                  }),
            ),
          ),
        )