Skip to content

Instantly share code, notes, and snippets.

@lukaskris
Last active July 3, 2019 11:02
Show Gist options
  • Save lukaskris/6ee894c8e304800df38f46108ca97f21 to your computer and use it in GitHub Desktop.
Save lukaskris/6ee894c8e304800df38f46108ca97f21 to your computer and use it in GitHub Desktop.
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