22 lines
563 B
Dart
22 lines
563 B
Dart
import 'package:aman_kassa_flutter/core/base/base_view_model.dart';
|
|
import 'package:aman_kassa_flutter/core/locator.dart';
|
|
|
|
import 'package:aman_kassa_flutter/core/services/navigator_service.dart';
|
|
|
|
|
|
class HomeViewModel extends BaseViewModel {
|
|
final NavigatorService _navigationService = locator<NavigatorService>();
|
|
int _counter;
|
|
|
|
HomeViewModel({int counter = 0}) : this._counter = counter;
|
|
|
|
int get counter => this._counter;
|
|
set counter(int value) {
|
|
this._counter = value;
|
|
notifyListeners();
|
|
}
|
|
|
|
void increment() => this.counter += 1;
|
|
|
|
|
|
} |