data_monitor 1.0.10
data_monitor: ^1.0.10 copied to clipboard
A Data Monitor package that encapsulates Annotations, Example and Utilities.
WARNING: #
This package is in beta and still being tested. Please do not use it yet.
Details #
This package allows Flutter projects to utilize State Management to overcome some of the limitations enforced by the framework.
Its main use is to create data repositories or models that allow callers to be notified when changes are made to member fields. These changes are tracked internally and cause Widgets that use the data to be rebuilt.
No more calls to setState().
Features #
Can be used (with more efficiency) to rebuild StatelessWidget. You can remove
all the verbose State code that is usually associated with a StatefulWidget.
Getting started #
The package is very simple to use. Just add code like the following to your data model class:
@dataMonitor
abstract class ModelData extends ChangeNotifier {
@monitor
int count;
@monitor
String name = 'A Name';
}
Usage #
A fully working Flutter Application that describes how to use the various
features is available in the /example directory.
Additional information #
Also included is a Code Generator that can be used with the build_runner package
to automatically generate boilerplate code from @annotations like the ones
seen above.