- Fix: This widget has been unmounted, so the State no longer has a context (and should be considered defunct).
- Fix
EventListener
not consuming events emitted in the event queue before widget is in the tree
- Updated installation, usage and setup in README
- Fix: Avoid
setState
being insideinitState
ofLiveDataBuilder
andLiveDataListener
- Fix ERROR: Concurrent modification during iteration: _Set if LiveData.removeObserver is called during notify
- Made
context.viewModelProvider.get()
safe to call inStatefulWidget.initState()
and anywhere you can accesscontext
- Removed deprecation for
context.viewModelProvider
as there are valid use cases for it like a GlobalViewModelProvider etc.
- More optimal
context.getViewModel()
andViewModelProvider.of(context)
methods to acquireViewModel
- Acquiring a
ViewModel
is now safe inStatefulWidget.initState()
context.viewModelProvider.get()
- Usecontext.getViewModel()
orViewModelProvider.of(context)
instead
EventListener
and EventQueue
for communicating events to UI
These events are expected to be used for ephemeral state changes to the UI like showing toasts, dialog etc.
- Diagram formatting in
viewmodel
documentation
example
published to pub.dev
ViewModelScopeState
->_ViewModelScopeState
LiveDataListener
for performing UI SideEffects onLiveData
value change
- Fixed
ViewModel
s not being cleared offViewModelStore
ondispose
(Might not have mattered in terms of application memory usage, since those objects don't have any reference and would be garbage collected)
- Initial Release with
ViewModel
andLiveData