Created
April 6, 2019 04:37
-
-
Save lawreyios/47bcddfb6518459891ff7f335e5167b6 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
import 'package:scoped_model/scoped_model.dart'; | |
class MainModel extends Model { | |
String _name = ""; | |
int _count = 0; | |
String get name { | |
return _name; | |
} | |
int get count { | |
return _count; | |
} | |
void updateName(String name) { | |
_name = name; | |
} | |
void incrementCount() { | |
_count += 1; | |
notifyListeners(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment