flutter_image_add_drag_sort 0.0.3 copy "flutter_image_add_drag_sort: ^0.0.3" to clipboard
flutter_image_add_drag_sort: ^0.0.3 copied to clipboard

Flutter Image add drag sort, Image add drag sort, support click event, delete, add, long press drag sort.

flutter_image_add_drag_sort #

pub package GitHub GitHub stars

Flutter Image add drag sort, Image add drag sort, support click event, delete, add, long press drag sort, support video fixed as the first.

Supported Platforms

  • Android
  • IOS

image

LICENSE #

MIT License #

How to Use #

# add this line to your dependencies
flutter_picker:
  git: git://github.com/yangyxd/flutter_image_add_drag_sort.git
import 'package:flutter_image_add_drag_sort/flutter_image_add_drag_sort.dart';

example #

  • Examples App - Demonstrates how to use the flutter_image_add_drag_sort plugin.
  List<ImageDataItem> imageList = [];

  ...

  ImageAddDragContainer(
      key: _key,  // GlobalKey()
      data: imageList,
      maxCount: 9,
      readOnly: false,
      draggableMode: false,
      itemSize: Size(imgSize, imgSize),
      addWidget: Icon(Icons.add, size: 24, color: Colors.black38),
      onAddImage: (onBegin) async {
        // add image 
        return await doAddImage(onBegin);
      },
      onChanged: (items) async {
        imageList = items;
      },
      onTapItem: (item, index) {
        Scaffold.of(context).showSnackBar(SnackBar(content: Text("click item: $index, ${item.key}")));
      },
      builderItem: (context, key, url, type) {
        // custom builder item
        return Container(
          color: Colors.yellow,
          child: url == null || url.isEmpty ? null : Image.file(File(url)),
        );
      },
  )

8
likes
40
pub points
24%
popularity

Publisher

unverified uploader

Flutter Image add drag sort, Image add drag sort, support click event, delete, add, long press drag sort.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_image_add_drag_sort