VGuide class

@author: wzp_vicky @description: 引导高光蒙层组件

核心能力:全屏遮罩 + 指定区域「挖洞高光」,用于新手引导、功能引导。 通过 show 的 targets 传入需要高亮(镂空)的 widget(GlobalKey), 组件内部自动换算坐标并在这些区域"挖洞"露出底层元素。 浮层内容若需贴着挖洞定位文案,通过 contentBuilder 回调拿组件算好的坐标即可。 配合 setHighlights 可在引导过程中动态切换高亮位置,实现步步引导。

若只是需要从底部弹出的面板,请用 VBottomSheet;居中对话框请用 VAlert。

Constructors

VGuide()

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

pop(BuildContext context) → dynamic
关闭引导蒙层
setHighlights(BuildContext context, List<RRect> highlights) → dynamic
动态更新高亮区域(蒙层展示期间调用,用于步步引导)。 传入的 RRect 来自 show 的 contentBuilder 回传的 rects,业务方无需自行换算坐标。
show(BuildContext context, {required List<VGuideTarget> targets, required Widget contentBuilder(List<RRect> rects), List<int>? initialHighlights, Offset? offsetLT, Offset? offsetRB, bool cancelable = true, bool outsideTouchCancelable = true, double? opacity, Duration duration = const Duration(milliseconds: 30), VoidCallback? onPopupShow, VoidCallback? onPopupDismiss, Color? holeBorderColor = Colors.white, double holeBorderWidth = 2}) → void
展示引导蒙层