Skip to content

bloc-v8.0.0

Compare
Choose a tag to compare
@felangel felangel released this 18 Nov 15:42
· 512 commits to master since this release
04f8000
  • BREAKING: feat: introduce BlocOverrides API (#2932)
    • Bloc.observer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.blocObserver
    • Bloc.transformer removed in favor of BlocOverrides.runZoned and BlocOverrides.current.eventTransformer
  • BREAKING: refactor: make BlocObserver an abstract class
  • BREAKING: feat: add throws StateError when bloc is closed (#2912)
  • BREAKING: feat: emit throws StateError when bloc is closed (#2913)
  • BREAKING: feat: improve error handling/reporting
    • BlocUnhandledErrorException is removed
    • Uncaught exceptions are always reported to onError and rethrown
    • addError reports error to onError but does not propagate as an uncaught exception
  • BREAKING: feat: restrict scope of emit in Bloc and Cubit
    • In Cubit, emit is protected so it can only be used within the Cubit instance.
    • In Bloc, emit is internal so it cannot be used outside of the internal package implementation.
  • BREAKING: refactor: remove deprecated TransitionFunction
  • BREAKING: refactor: remove deprecated transformEvents
  • BREAKING: refactor: remove deprecated mapEventToState
  • BREAKING: refactor: remove deprecated transformTransitions
  • BREAKING: refactor: remove deprecated listen on BlocBase
  • feat: throw StateError if an event is added without a registered event handler