deex 0.0.1
deex: ^0.0.1 copied to clipboard
State management to Apps Flutter.
Deex #
Deex is a state management library for Flutter, based on GetX but focused exclusively on state management. This README provides an overview of how to use Deex in a Flutter application.
Installation #
Add Deex to your pubspec.yaml file:
dependencies:
deex: # latest
Then run:
flutter pub get
Usage #
import 'package:deex/deex.dart';
Widget responsible for rebuilding Widgets #
The Deex widget makes the UI reactive to changes in the controller state, rebuilding the UI whenever the observed state changes.
Deex(
() => Text('${controller.count.value}'),
),
The widget rebuilds itself every time the action is executed:
onPressed: controller.increment,
The Controller with reactive state #
The Controller extends DeexStore and contains the reactive state, using the .obs extension to make the variables observable.
class Controller extends DeexStore {
var count = 0.obs;
void increment() => count++;
}
License #
This project is licensed under the MIT license - see the LICENSE file for more details.
Contribution #
Contributions are welcome! Please open an issue or submit a pull request.
Author #
Maintained by Raphael Pontes.
Did I help you? Buy me a coffee.