staggered_reorderable 0.0.4 copy "staggered_reorderable: ^0.0.4" to clipboard
staggered_reorderable: ^0.0.4 copied to clipboard

可拖拽的不规则图形排序

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:staggered_reorderable/staggered_reorderable.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
  }

  List<CustomerItem> itemAll = [
    CustomerItem(0, "id_0", const Text("A"),
        crossAxisCellCount: 1, mainAxisCellCount: 1),
    CustomerItem(1, "id_1", const Text("B"),
        crossAxisCellCount: 2, mainAxisCellCount: 1),
    CustomerItem(2, "id_2",const Text("C"),
        crossAxisCellCount: 1, mainAxisCellCount: 1),
    CustomerItem(3, "id_3",const Text("D"),
        crossAxisCellCount: 2, mainAxisCellCount: 2),
    CustomerItem(4, "id_4",const Text("E"),
        crossAxisCellCount: 1, mainAxisCellCount: 1),
    CustomerItem(5, "id_5",const Text("F"),
        crossAxisCellCount: 1, mainAxisCellCount: 1),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('staggered_reorderable example app'),
        ),
        body: StaggeredReorderableView.customer(children: itemAll),
      ),
    );
  }
}
13
likes
135
pub points
29%
popularity

Publisher

unverified uploader

可拖拽的不规则图形排序

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on staggered_reorderable