MySelectorResult<T> class
sealed
MySelector.show 的返回结果,区分"关闭不做事"与"用户明确操作"。
final result = await MySelector.show<String>(...);
switch (result) {
case MySelectorDismissed():
break; // 用户点外部或按 Escape,不做任何操作
case MySelectorValueChanged(:final value):
state = value; // null = 主动清除;非 null = 选中了某项
}
- Implementers
- Available extensions
Properties
-
changed
→ MySelectorValueChanged<
T> ? -
Available on MySelectorResult<
用户做出了明确操作时返回 MySelectorValueChanged,否则返回T> , provided by the MySelectorResultX extensionnull。no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isDismissed → bool
-
Available on MySelectorResult<
用户是否点击了外部/按 Escape 关闭面板(未做出明确选择)。T> , provided by the MySelectorResultX extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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