find_us
haroon amjad 4 years ago
parent 35cd02494c
commit a7f5dfab5c

@ -169,10 +169,11 @@ class DoctorList {
class PatientDoctorAppointmentList {
String filterName = "";
String distanceInKMs = "";
List<DoctorList> patientDoctorAppointmentList = List();
PatientDoctorAppointmentList(
{this.filterName, DoctorList patientDoctorAppointment}) {
{this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -33,7 +33,7 @@ class _SearchResultsState extends State<SearchResults> {
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
body: Container(
margin: EdgeInsets.only(bottom: 10.0),
margin: EdgeInsets.all(10.0),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
@ -42,7 +42,8 @@ class _SearchResultsState extends State<SearchResults> {
widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
title: widget
.patientDoctorAppointmentListHospital[index].filterName,
.patientDoctorAppointmentListHospital[index].filterName + " - " +widget
.patientDoctorAppointmentListHospital[index].distanceInKMs + " KMs" ,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -117,6 +117,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});

@ -79,12 +79,20 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsListByName(String docName, BuildContext context) async {
Map<String, dynamic> request;
double lat;
double long;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
@ -106,8 +114,8 @@ class DoctorsListService extends BaseService {
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false,
"Latitude": 0,
"Longitude": 0,
"Latitude": lat,
"Longitude": long,
"License": true
};

Loading…
Cancel
Save