Created
May 7, 2021 15:31
-
-
Save arulwastaken/c0cc6ec613f72c737259bb14d826d9b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class MvvmViewModel with ChangeNotifier { | |
String welcomeText = ""; | |
final MvvmRepo repo; | |
MvvmViewModel(this.repo) { | |
loadWelcomeText(); | |
} | |
Future<void> loadWelcomeText() async { | |
welcomeText = await repo.getWelcomeText(); | |
notifyListeners(); | |
} | |
// other methods implementation | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment