MockClickUtil class

模拟点击工具类

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

mockGlobalKeyClick(GlobalKey<State<StatefulWidget>>? globalKey, {int delayed = 100}) → dynamic
模拟点击某个组件 globalKey 需要执行模拟点击的组件的key delayed 延迟执行抬起事件的时长,单位毫秒
mockLocationClick(double dx, double dy, {int delayed = 100}) → dynamic
模拟点击某个确定的坐标位置 dx 距离屏幕左边的位置 dy 距离屏幕上边的位置 delayed 延迟执行抬起事件的时长,单位毫秒
mockScreenRandomClick(BuildContext? context, {int delayed = 100}) → dynamic
屏幕内随机点击 context 无所谓谁的context,主要用来获取屏幕宽高 delayed 延迟执行抬起事件的时长,单位毫秒
mockWidgetClick(BuildContext? context, {int delayed = 100}) → dynamic
模拟点击某个组件 context 需要执行模拟点击的组件的context delayed 延迟执行抬起事件的时长,单位毫秒