dispatchEvent method
Implementation
Future<void> dispatchEvent(Finder finder, web.Event event,
{void Function(web.Element)? before, bool pump = true}) async {
var element = _findDomElement(finder);
var source = (element.renderObject as DomRenderObject).node;
if (source is web.Element) {
before?.call(source);
source.dispatchEvent(event);
}
if (pump) {
await pumpEventQueue();
}
}