Created
March 20, 2022 10:31
-
-
Save CodingWithTashi/a9dd192052dcbbaea0611e460118fe7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
///THIS CLASS IS WHERE STATE ARE BEING MANAGE,EVERYTIME WE CALL update(), IT WILL INFORM | |
///TEXT WIDGET TO REBUILD | |
class CounterProvider extends ChangeNotifier { | |
int count = 0; | |
update() { | |
count++; | |
notifyListeners(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment