rx_store_ds 0.0.5 rx_store_ds: ^0.0.5 copied to clipboard
An awesome Flutter package to manage state of program declaratively and functionally with rx support.
Store Ds
Fast, enjoyable, declaratively and functionally state management in flutter
You can also view a video demonstration if are a video personRx Store Ds #
An awesome Flutter package to manage state of program declaratively and functionally.
Inspiration #
This package is inspired from javascript way of storing objects in map like structures.
Usage #
You can use store_ds
to manage state as follows.
Widget build(BuildContext context) {
useStore('rootStore');
listenToStore(
'hello',
RxCommand.createSync<String, String>((param) => param + param),
'rootStore');
listenToStore(
'pommello', RxCommand.createSync<int, int>((param) => param + param));
getFromRxStore<String, String>(
'hello',
).listen((value) {
print(value);
});
getFromRxStore<int, int>(
'pommello',
).listen((value) {
print(value);
});
saveToStore('hello', 'value');
saveToStore('pommello', 5);
logRxStore();
Store❤️ Flutter #
Store was written with Flutter in mind. It is a perfect fit for managing variables:
Licence #
Copyright 2020 Chetan Jain
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.