free_scroll_listview 1.2.5 copy "free_scroll_listview: ^1.2.5" to clipboard
free_scroll_listview: ^1.2.5 copied to clipboard

This is a listview support scroll to any index with animation you need.

// create a FreeScrollListView and use controller to add tail data or head data.

///controller
final FreeScrollListViewController _controller = FreeScrollListViewController();

// create list view
FreeScrollListView(
  controller: _controller,
  headerView: Container(
    height: 60,
    color: Colors.redAccent,
  ),
  footerView: Container(
    height: 60,
    color: Colors.blue,
  ),
  reverse: false,
  
  /*willReachTail: () {
    return _checkAddTail();
  },
  willReachHead: () {
    return _checkAddHead();
  },*/
  builder: (context, index) {
    return Container(
      height: 75,
      decoration: BoxDecoration(
        border: Border(
          bottom: BorderSide(
            color: Colors.black.withAlpha(20),
            width: 0.5,
          ),
        ),
      ),
      alignment: Alignment.center,
      child: Text(
        _controller.dataList[index],
      ),
    );
  },
)

//use scroll to index to scroll to any index you need.
_controller.scrollToIndex(
  80,
);

0
likes
160
points
560
downloads

Publisher

unverified uploader

Weekly Downloads

This is a listview support scroll to any index with animation you need.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, synchronized

More

Packages that depend on free_scroll_listview