ChangeNotifier
Controlling Widgets with ChangeNotifier
When You Need to Control a Widget from Outside
Quickly Implementing ChangeNotifier
MasonController Section
/// Part II: Controller
class {{name.pascalCase()}}Controller with ChangeNotifier implements Listenable {
/// Learn more: url_to_document_of_package
int _example = 0;
int get example => _example;
// USE | controller.example = example;
set example(int index){
_example = index;
notifyListeners();
}
// @override
// void dispose() {
// super.dispose();
//
// }
}UI Section
Real-World Usage

Step 1: Initialize the Controller
Step 2: Initialize the UI

Step 3: Usage

Last updated