flutter_slidable_list_view 1.2.8

Flutter Android iOS web

a item slidable listView, You can use it like you would with a ListView,

flutter_slidable_list_view #

a item slidable listView, the slide item is learn from flutter_slidable, i need some effect that like IOS's list or QQ mobile client's chat list,so this package burn.

Getting Started #

The usage of this Widget is similar to that of ListView.

        SlideListView(
          itemBuilder: (bc, index) {
            // return your item widget here,no need to consider the click event
          },
          actionWidgetBuilder: ActionWidgetDelegate( $action_count, (index) {
            // return your action widget
          }, (int indexInList, int index, BaseSlideItem item) {
            // deal the action click event here,you can use item.close(),item.remove() to close or remove this item after click action 
          }, [$action_colors]),// action_colors.len need equal to action_count
          dataList: $data_list,
        )

Preview #

Parameter Description #

SlideListView

parametertypedescriptiondefault value
dataListListthe list datano default,required
slideProportiondoublethis value determine the action width0.25
itemBackgroundColorColorthe list item background color,don't use Transparentwhite
supportElasticSlidingboolhas elasticsliding effict when slidetrue
animationDurationDurationthe animation duration200 ms
refreshCallbackFutureif null,list dont support swip refreshnull
itemBuilderWidget Function(BuildContext context, int index)build the list itemrequired
separatorBuilderWidget Function(BuildContext context, int index)build the list separatorDivider(height: 1)
actionWidgetDelegateActionWidgetDelegatebuild the action widgetrequired
refreshWidgetBuilderWidget Function( Widget content, RefreshCallback refreshCallback)you can use your custom refresh indicatorRefreshIndicator
onGestureEndvoid Function(DragEndDetails detail, double itemWidth,double translateValue, Function openF, Function closeF)determine when to close or open action on gesture endnull

ActionWidgetDelegate

parametertypedescriptiondefault value
actionCountintthe actionButton's countrequired
actionBuilderWidget Function(int actionIndex, int indexInList)build the action buttonrequired
clickCallbackFunction(int indexInList, int index, BaseSlideItem item)handle click actionnull
actionBackgroundColorsListgiven the action button background color(this list's length must same with actionCount)null
7
likes
90
pub points
76%
popularity

a item slidable listView, You can use it like you would with a ListView,

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

tsx1453@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_slidable_list_view