You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmg_nurses/lib/provider/base_vm.dart

25 lines
481 B
Dart

import 'package:flutter/material.dart';
import 'package:hmg_nurses/classes/enums.dart';
class BaseViewModel extends ChangeNotifier {
ViewState _state = ViewState.idle;
bool isInternetConnection = true;
ViewState get state => _state;
String error = "";
//TODO add the user login model when we need it
void setOnlyState(ViewState viewState) {
_state = viewState;
}
void setState(ViewState viewState) {
_state = viewState;
notifyListeners();
}
}