v0.2.0item_selector
一個通用的項目選擇器,可與 ListView、GridView、Row、Column 或基本上任何可以擁有索引子項的父組件一起使用。
34喜歡 15近 30 天下載140Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter 的項目選擇器
{"sdk":"flutter"}^0.3.0{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
pub license: MIT build codecov
A generic Flutter item selector that works with ListView, GridView, Row, Column, or basically any parent widget that can have indexed child widgets. It supports single-selection by tap, and multi-selection by long-press and drag with auto-scrolling.
| ListView | GridView |
|---|---|
| ListView | GridView |
| Column | Custom |
|---|---|
| Column | Custom |
To use this package, add item_selector as a dependency in your pubspec.yaml file.
ItemSelectionController(
child: ListView(
children: List.generate(10, (int index) {
return ItemSelectionBuilder(
index: index,
builder: (BuildContext context, int index, bool selected) {
return Text('$index: $selected');
},
);
}),
),
)
Item Selector is based on Multi Select GridView in Flutter - by Simon Lightfoot.