down method
Future
down(
- MouseButton button, {
- PageLoaderElement? eventTarget,
- ClickOption? clickOption,
override
Press button
on the mouse at its current location with clickOption
.
If eventTarget
is specified, PageLoader will attempt to fire the
corresponding mouse events on that target, otherwise it will fire the
events on the target that is under the current mouse location.
clickOption
is only used for Html.
Implementation
@override
Future<dynamic> down(MouseButton button,
{PageLoaderElement? eventTarget, ClickOption? clickOption}) =>
syncFn(() async {
if (eventTarget != null) {
await moveTo(eventTarget as HtmlPageLoaderElement, null, null);
}
if (button == MouseButton.primary) {
await _dispatchEvent('click', eventTarget as HtmlPageLoaderElement?,
button, clickOption);
}
return _dispatchEvent('mousedown',
eventTarget as HtmlPageLoaderElement?, button, clickOption);
});