dispatchCustomEvent method

  1. @override
Future<void> dispatchCustomEvent(
  1. String name, {
  2. Object? detail,
})
override

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 {
  await syncFn(() async => _retryWhenStale(() async {
        await _microtask(
            () => dispatchEvent(CustomEvent(name, detail: detail)));
      }));
}