send method

Future<void> send(
  1. EventBase event, {
  2. Duration? delay,
})

Sends an event to the bloc and waits for processing.

event - The event to send. delay - How long to wait for processing (default 10ms).

Implementation

Future<void> send(EventBase event, {Duration? delay}) async {
  await bloc.send(event);
  await Future.delayed(delay ?? const Duration(milliseconds: 10));
}