- Hotfix. Added check if controller is not closed before sending any events to it
- Added
useIsolatedController
parameter toLiteState
which allows to use the same controller type for many widgets but the controller instances must be different. In this case pass an instance of the controller and setuseIsolatedController
to true. See the example inMultiControllerSetup
class in the example project
- Add possibility to reset and dispose all controllers in one call
just call
LiteState.resetAllControllers(dispose: true)
- Added isSliver parameter
onReady
is now guaranteed to be called after frame
- Added rebuild to
setPersistentList()
- Fix uncontrollable provided repo clearance
- added
repo
getter to aLiteStateController
- added
getList
andsetList
methods toLiteRepo
- Introduced LiteRepo. Now different controllers are able to use the same repository. See example project
- All controller storages can now be encrypted by a password. You can pass it via LiteStateController constructor or to a repository itself
- nonEncodable null check
- Fixed Hive initialization on web
- Added
preserveLocalStorageOnControllerDispose
parameter to a controller. It allows for storing persistent data despite of the controller's lifecycle If you still need to clear it's data for some reason, callclearPersistentData(forceClearLocalStorage: true);
on the controller
- Maps can also now be stored in
Hive
based storage
- Clear persistent data on controller dispose
LiteState
constructor now can acceptonReady
callback which will be called when the controller has initialized it's local storage andLiteState
has completed its first build. You can use this callback to start some operations that require local storage of the controller to be already initiated
- List storage
- Added generic type logging
- clearPersistentData() now has a parameter forceReBuild and does not kill a Hive box
- Fixed encoder and reviver
- Builder is not called until local storage is initialized
- Moved from SharedPreferences to Hive because SharedPreferences initialization is very slow on Android
- Added debugging of local storage
- Initialization of shared preferences fixed. Now the callback is guaranteed to be called
- Changed error background color from red to transparent
- Fixed not closed broadcast stream for a single use controller
- Breaking change. Corrected a typo. Renamed onLocalStorageInitialied to onLocalStorageInitialized.
- Added a single use controllers
- Removed throw when it's impossible to decode a data and added a description instead
- Added disposeControllerByType() global method which allows to completely kill a controller
- Dramatically simplified and improved a work with JSON encoders and decoders for local storage
- Added more information to the docs
- Added a global method resetAllControllers() which calls "reset()" method
- on all initialized controllers. It's an abstract method and must be overridden in all the controllers
- Rebuild after setPersistentValue
- Added stopAllLoadings() to the LiteState to be able to stop all loaders at once
- Updated readme file
- Initial release of a very simple state controller