publishTo method

void publishTo (
  1. BuildContext context,
  2. dynamic event
)

An convenient call to publish event via the EventBus provided by an ancestor EventBusWidget

Following code

EventBus.publishTo(context, event);

is equivalent to

EventBus.of(context).publish(event);

Implementation

static void publishTo(BuildContext context, event) =>
    of(context).publish(event);