v1.0.13reorderable_grid
flutter의 네이티브 재정렬 가능한 목록과 유사한 완전한 재정렬 가능한 그리드 구현.
재정렬 가능한 그리드 UI 패턴의 Flutter 구현으로, 기존의 Flutter ReorderableList와 매우 유사함
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A full reorderable grid implemention similar to Flutters Reorderable_List. with full ReorderableGridView, ReorderableGrid and SliverReorderableGrid implementations

ReorderableGridView is a drop in replacement for the existing GridView and adds an onReorder callback that provides the original and new index of the reordered item.
/// create a new list of data
final items = List<int>.generate(40, (index) => index);
/// when the reorder completes remove the list entry from its old position
/// and insert it at its new index
void _onReorder(int oldIndex, int newIndex) {
setState(() {
final item = items.removeAt(oldIndex);
items.insert(newIndex, item);
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: ReorderableGridView.extent(
maxCrossAxisExtent: 250,
onReorder: _onReorder,
childAspectRatio: 1,
children: items.map((item) {
/// map every list entry to a widget and assure every child has a
/// unique key
return Card(
key: ValueKey(item),
child: Center(
child: Text(item.toString()),
),
);
}).toList(),
),
),
);
}
ReorderableGrid provides all the constructors and parameters the normal GridView has. The package also includes:
ReorderableGridView, which is a prebuild Material-ish implementation of the grid.ReorderableGrid, A barebones widget that allows you to customize the grid however you wantSliverReorderableGrid, a reorderable grid sliver for custom scroll implementationsYou can find all features and fuctionality documented here
If this package is useful to you please :thumbsup: on pub.dev and :star: on github. If you have any Issues, recommendations or pull requests I'd love to see them!
의존성 목록 3 개
{"sdk":"flutter"}{"sdk":"flutter"}^6.0.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗