Skip to content

v7.0.1

Choose a tag to compare

@jacobaraujo7 jacobaraujo7 released this 23 Jun 03:28
· 10 commits to master since this release
d1eef13

📦 Published on pub.dev: https://pub.dev/packages/flutter_modular/versions/7.0.1

Page-scoped BLoC/Cubit support

  • Scoped.addStreamable<T>(ctor, (t) => t.stream, (t) => t.close()) — exposes the object itself via context.watch<T>() (read its synchronous state, call its methods) while rebuilds are driven by its stream. flutter_modular keeps no dependency on the bloc package (stream/close are caller callbacks). See the docs for a suggested addBloc extension covering both BLoC and Cubit.
  • addListenable<T>(ctor, (t) => t.listenable, (t) => t.dispose()) — for objects whose reactivity is a Listenable property.

Simpler non-reactive registration

  • add<T>(ctor) — non-reactive page-scoped object, readable via context.read/watch, disposed on unmount when it implements Disposable. Breaking: replaces addDisposable (removed; the Disposable interface is retained).

Internals

  • addChangeNotifier reexpressed over addListenable; watch/read/Consumer/Selector now accept any Object (not just Listenable), so a non-Listenable reactive object can be exposed. Fully backward compatible.

Full Changelog: https://github.com/Flutterando/modular/blob/master/CHANGELOG.md