find_us
haroon amjad 4 years ago
parent 35cd02494c
commit a7f5dfab5c

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

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

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

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

Loading…
Cancel
Save