|
|
|
@ -6,7 +6,7 @@ import 'package:http/http.dart' as http;
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
|
|
|
|
class PatientsProvider with ChangeNotifier {
|
|
|
|
class PatientsProvider with ChangeNotifier {
|
|
|
|
Future<void> getPatientList(PatientModel patient, patientType) async {
|
|
|
|
Future<Map> getPatientList(PatientModel patient, patientType) async {
|
|
|
|
Map<String, String> requestHeaders = {
|
|
|
|
Map<String, String> requestHeaders = {
|
|
|
|
'Content-type': 'application/json',
|
|
|
|
'Content-type': 'application/json',
|
|
|
|
'Accept': 'application/json',
|
|
|
|
'Accept': 'application/json',
|
|
|
|
@ -41,6 +41,7 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
// var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
|
|
|
|
// var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
|
|
|
|
print('Response status: ${response.statusCode}');
|
|
|
|
print('Response status: ${response.statusCode}');
|
|
|
|
print('Response body: ${response.body}');
|
|
|
|
print('Response body: ${response.body}');
|
|
|
|
|
|
|
|
return Future.value(json.decode(response.body));
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
print(error.toString());
|
|
|
|
print(error.toString());
|
|
|
|
|