InspectorToast class

插件内统一提示(toast)组件。

所有面板内的反馈(复制 / 导出 / 分享 / 重放 / bug report 等)都通过 InspectorToast.show 触发,集中控制样式,避免各处重复创建 SnackBar。

提示以悬浮卡片形式插入面板所在的根 Overlay 最上层,并锚定在屏幕 顶部,因此始终位于面板之上、且不会被面板遮挡(普通的 SnackBar 只能固定在底部,无法满足"置顶"需求)。

Centralized toast for all in-panel feedback. Wrapping it in one component keeps styling consistent and guarantees the prompt renders above the panel. It is a floating card inserted on top of the root Overlay and anchored to the top of the screen (a plain SnackBar is always bottom-anchored).

Properties

hashCode → int
The hash code for this object.
no setterinherited
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

Static Methods

show(BuildContext context, String message, {Duration duration = const Duration(seconds: 2), SnackBarAction? action}) → void
在 context 所属的根 Overlay 顶部弹出一个置顶提示。 Show a top-anchored toast on the root Overlay above context.
showOn(OverlayState overlay, String message, {Duration duration = const Duration(seconds: 2), SnackBarAction? action}) → void
在指定的 OverlayState 上弹出置顶提示。