call method

void call(
  1. State newState
)

Implementation

void call(State newState) {
  assert(
    _enabled,
    '''\n\n
emit was called after an event handler completed normally.
This is usually due to an unawaited future in an event handler.
**BAD**
on<Event>((event, emit) {
  future.whenComplete(() => emit(...));
});
**GOOD**
on<Event>((event, emit) async {
  await future.whenComplete(() => emit(...));
});
''',
  );
  _updater(newState);
}