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
refreshCallbackFuture Function()if 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

ActionWidgetDelegate

parametertypedescriptiondefault value
actionCountintthe actionButton's countrequired
actionBuilderWidget Function(int index)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

Libraries

action_widgets
base_def
flutter_slidable_list_view
inherited_widgets
slide_item
slide_list