JunnyMenuItemTile class

单个菜单项瓦片。

这个组件同时承担两类菜单视觉:

  1. 工作台 / 快捷菜单:通常是 3 列或 4 列的紧凑入口卡片;
  2. 子系统页:通常是 2 列的长卡片,标题与描述更强调可读性。

因为两类场景最终都复用了同一个 Grid + Tile 体系, 所以这个文件里会看到很多“按列数切换布局语义”的判断。

Inheritance
Available extensions

Constructors

JunnyMenuItemTile({Key? key, required JunnyMenuItemViewModel item, required int index, FutureOr<void> onTap(JunnyMenuItemViewModel item)?, JunnyMenuRenderConfig? renderConfig, JunnyMenuGridConfig? gridConfig})
创建菜单项瓦片。
const

Properties

gridConfig JunnyMenuGridConfig?
网格布局配置。
final
hashCode int
The hash code for this object.
no setterinherited
index int
菜单项在网格中的索引。
final
item JunnyMenuItemViewModel
菜单项。
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap FutureOr<void> Function(JunnyMenuItemViewModel item)?
点击回调。
final
renderConfig JunnyMenuRenderConfig?
渲染配置。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
构建单个菜单项瓦片。
override
buildPageRoute<T>({RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool opaque = true}) PageRoute<T>

Available on Widget, provided by the JunnyWidgetExtension extension

构建PageRoute
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited