- Docs: Fix typo in README usage section
- Fix: This widget has been unmounted, so the State no longer has a context (and should be considered defunct).
- Fix
EventListenernot consuming events emitted in the event queue before widget is in the tree
- Updated installation, usage and setup in README
- Fix: Avoid
setStatebeing insideinitStateofLiveDataBuilderandLiveDataListener
- 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.viewModelProvideras there are valid use cases for it like a GlobalViewModelProvider etc.
- More optimal
context.getViewModel()andViewModelProvider.of(context)methods to acquireViewModel - Acquiring a
ViewModelis 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
viewmodeldocumentation
examplepublished to pub.dev
ViewModelScopeState->_ViewModelScopeState
LiveDataListenerfor performing UI SideEffects onLiveDatavalue change
- Fixed
ViewModels not being cleared offViewModelStoreondispose(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
ViewModelandLiveData