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.
30 lines
965 B
Dart
30 lines
965 B
Dart
|
4 years ago
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart';
|
||
|
|
import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart';
|
||
|
|
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||
|
|
import 'package:provider/provider.dart';
|
||
|
|
|
||
|
|
import '../../../locator.dart';
|
||
|
|
import '../project_view_model.dart';
|
||
|
|
|
||
|
|
class PrescriptionViewModel extends BaseViewModel {
|
||
|
|
|
||
|
|
PrescriptionService _prescriptionService = locator<PrescriptionService>();
|
||
|
|
|
||
|
|
List<Prescriptions> get prescriptionsList =>
|
||
|
|
_prescriptionService.prescriptionsList;
|
||
|
|
|
||
|
|
getPrescription() async {
|
||
|
|
await getSavedLanguage();
|
||
|
|
|
||
|
|
/*
|
||
|
|
setState(ViewState.Busy);
|
||
|
|
await _prescriptionService.getPrescription();
|
||
|
|
if (_prescriptionService.hasError) {
|
||
|
|
error = _prescriptionService.error;
|
||
|
|
setState(ViewState.Error);
|
||
|
|
} else {
|
||
|
|
setState(ViewState.Idle);
|
||
|
|
}*/
|
||
|
|
}
|
||
|
|
}
|