Last active
July 3, 2019 11:02
-
-
Save lukaskris/6ee894c8e304800df38f46108ca97f21 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:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:scoped_model/scoped_model.dart'; | |
| class CounterModel extends Model{ | |
| int _counter = 0; | |
| int get counter => _counter; | |
| void increment() { | |
| _counter++; | |
| notifyListeners(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment