dispatchCustomEvent method
Dispatches the eventName
custom event on this element.
If provided, detail
is copied into the event.
Implementation
@override
Future<void> dispatchCustomEvent(String name, {Object? detail}) async =>
_retryWhenStale(() => _driver.execute('''arguments[0].dispatchEvent(
new CustomEvent(arguments[1], { detail: JSON.parse(arguments[2]) }));''',
[_single, name, json.encode(detail)]));