Advertisement
Guest User

Untitled

a guest
Jan 25th, 2022
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. E/flutter ( 4322): emit was called after an event handler completed normally.
  2. E/flutter ( 4322): This is usually due to an unawaited future in an event handler.
  3. E/flutter ( 4322): Please make sure to await all asynchronous operations with event handlers
  4. E/flutter ( 4322): and use emit.isDone after asynchronous operations before calling emit() to
  5. E/flutter ( 4322): ensure the event handler has not completed.
  6. E/flutter ( 4322):
  7. E/flutter ( 4322): **BAD**
  8. E/flutter ( 4322): on<Event>((event, emit) {
  9. E/flutter ( 4322): future.whenComplete(() => emit(...));
  10. E/flutter ( 4322): });
  11. E/flutter ( 4322):
  12. E/flutter ( 4322): **GOOD**
  13. E/flutter ( 4322): on<Event>((event, emit) async {
  14. E/flutter ( 4322): await future.whenComplete(() => emit(...));
  15. E/flutter ( 4322): });
  16. E/flutter ( 4322):
  17. E/flutter ( 4322): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:47:61)
  18. E/flutter ( 4322): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
  19. E/flutter ( 4322): #2 _Emitter.call (package:bloc/src/bloc.dart:232:7)
  20. E/flutter ( 4322): #3 new NumberTriviaBloc.<anonymous closure>.<anonymous closure> (package:clean_architecture/presentation/bloc/number_trivia_bloc.dart:40:13)
  21. E/flutter ( 4322): <asynchronous suspension>
  22. E/flutter ( 4322):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement