v0.1.0-dev.5expandable_tree_menu
由遞迴節點列表建構而成的菜單節點樹,可展開/收起以檢視更多菜單節點。
49喜歡 100近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter 小工具,讓您輕鬆從遞迴資料節點清單建立樹狀結構的「選單」
{"sdk":"flutter"}{"sdk":"flutter"}^1.11.0以下為英文專案原文快照,最新內容請造訪 GitHub。
A Tree of Sub-menus that can be expanded/collapsed and each node can recursively contain another tree.
Using the onSelect callback allows the Tree to be used as a menu.
Add the dependency to the pubspec.yaml file
dependencies: ... expandable_tree_menu: ^0.1.0
Import it
import 'package:expandable_tree_menu/expandable_tree_menu.dart';
Instantiate it somewhere
ExpandableTree( nodes: _nodesFromBooks(bookNodes), nodeBuilder: _nodeBuilder, onSelect: (dynamic node) => _nodeSelected(context, node), ),