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.
44 lines
1.2 KiB
Dart
44 lines
1.2 KiB
Dart
4 years ago
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||
|
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
|
||
|
|
||
|
class VaccineService extends BaseService {
|
||
|
List<VaccineModel> _vaccineList = List();
|
||
|
|
||
|
List<VaccineModel> get vaccineList => _vaccineList;
|
||
|
|
||
|
VaccineModel _vaccineModel = VaccineModel(
|
||
|
to: "0",
|
||
|
from: "0",
|
||
|
channel: 3,
|
||
|
deviceTypeID: 2,
|
||
|
generalid: "Cs2020@2016\$2958",
|
||
|
iPAdress: "10.20.10.20",
|
||
|
isDentalAllowedBackend: false,
|
||
|
languageID: 2,
|
||
|
patientID: 1231755,
|
||
|
patientOutSA: 0,
|
||
|
patientType: 1,
|
||
|
patientTypeID: 1,
|
||
|
sessionID: "uoKFXSLUwEaHYPwKZNA",
|
||
|
tokenID: "@dm!n",
|
||
|
versionID: 5.5,
|
||
|
);
|
||
|
|
||
|
Future getMyVaccine() async {
|
||
|
hasError = false;
|
||
|
_vaccineList.clear();
|
||
|
await baseAppClient.post(GET_VACCINES,
|
||
|
onSuccess: (dynamic response, int statusCode) {
|
||
|
response['List_DoneVaccines'].forEach((item) {
|
||
|
_vaccineList.add(VaccineModel.fromJson(item));
|
||
|
});
|
||
|
}, onFailure: (String error, int statusCode) {
|
||
|
hasError = true;
|
||
|
super.error = error;
|
||
|
}, body: _vaccineModel.toJson());
|
||
|
}
|
||
|
|
||
|
Future sendEmail() async {}
|
||
|
}
|