Last active
January 8, 2019 00:48
-
-
Save KickedDroid/d2ae20ebd55dace9fd2f4bebe9a9ce19 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
class UserModel extends Model { | |
String _userName = ""; | |
String get userName => _userName; | |
// The changeName method has a String parameter to pass the value | |
void changeName(String newValue) { | |
// We set the users name to the updated value | |
_userName = newValue; | |
// Then notify all the listeners. | |
notifyListeners(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment