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.
31 lines
1.1 KiB
Dart
31 lines
1.1 KiB
Dart
import 'dart:convert';
|
|
|
|
import 'package:doctor_app_flutter/client/app_client.dart';
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
import 'package:doctor_app_flutter/models/pharmacies_request_model.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
class MedicineProvider with ChangeNotifier {
|
|
|
|
Future<Map> getPharmacyList(PharmaciesRequestModel pharmacy) async {
|
|
try {
|
|
final response = await AppClient.post(PHARMACY_ITEMS_URL,
|
|
body: json.encode({
|
|
"PHR_itemName": pharmacy.PHR_itemName,
|
|
"LanguageID": pharmacy.LanguageID,
|
|
"stamp": pharmacy.stamp,
|
|
"IPAdress": pharmacy.IPAdress,
|
|
"VersionID": pharmacy.VersionID,
|
|
"TokenID": pharmacy.TokenID,
|
|
"SessionID": pharmacy.SessionID,
|
|
"IsLoginForDoctorApp": pharmacy.IsLoginForDoctorApp,
|
|
"PatientOutSA": pharmacy.PatientOutSA,
|
|
"PatientTypeID": pharmacy.PatientTypeID
|
|
}));
|
|
return Future.value(json.decode(response.body));
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
}
|