MyTrayMenuItem class
托盘菜单项配置类
Constructors
-
MyTrayMenuItem({String? key, required String label, FutureOr<
void> onTap()?, String? icon, bool enabled = true, bool isSeparator = false, }) -
const
- MyTrayMenuItem.separator()
-
创建分隔符菜单项
const
Properties
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
final
- isSeparator → bool
-
final
- key → String?
-
稳定键,用于唯一标识菜单项;不提供时回退使用 label
final
- label → String
-
final
-
onTap
→ FutureOr<
void> Function()? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
final
Methods
-
copyWith(
{String? key, String? label, FutureOr< void> onTap()?, String? icon, bool? enabled, bool? isSeparator, }) → MyTrayMenuItem - 便捷复制(不可变模式)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited