flutter_slidable_list_view 1.2.5

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

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

[0.0.1] - finish the main function.

[0.0.2] - change description for this project

[1.0.0] - change description

[1.0.1] - update description

[1.2.0] - finish the description of it,did't change main code

[1.2.1] - add itemCount param,you can set the item count by yourself

[1.2.2] - fix v1.2.1 item count bug

[1.2.3] - fix crash when remove item

[1.2.4] - add UnSlidableWidget to make some item not slide when touch

[1.2.5] - when dataList'length change, list will jump to top <-- bug fixed

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_slidable_list_view: ^1.2.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_slidable_list_view/flutter_slidable_list_view.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test