WD: search by region changes

merge-update-with-lab-changes
taha.alam 7 months ago
parent ae4c287af2
commit 951a5a4932

@ -23,6 +23,7 @@ const Map platformLocalizedValues = {
};
const Map localizedValues = {
'kilometerUnit': {'en': 'KM', 'ar': 'كيلومتر'},
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
@ -2146,7 +2147,10 @@ const Map localizedValues = {
"selectFacitlity": {"en": "Select Facility", "ar": "اختر المنشأة"},
"selectDoctor": {"en": "Select Doctor", "ar": "اختر الطبيب"},
"hmgHospital": {"en": "HMG Hospital", "ar": "مستشفى HMG"},
"hmcHospital": {"en": "HMC", "ar": "HMC"},
"hmcHospitalCount": {"en": "@ HMC", "ar": "@ HMC"},
"hmcHospital": {"en": "HMG Medical Center", "ar": "مركز إتش إم جي الطبي"},
"hmcHospitalCount": {
"en": "@ HMG Medical Center",
"ar": "@ مركز إتش إم جي الطبي"
},
"hmgHospitalCount": {"en": "@ HMG Hospital", "ar": "@ مستشفى HMG"},
};

@ -10,8 +10,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResultsByRegion.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/SearchResultWithTab.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart';
@ -719,7 +719,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push(
context,
FadePage(
page: SearchResultsByRegion(
page: SearchResultWithTab(
doctorsList: [],
patientDoctorAppointmentListHospital: regionHospitalList,
isLiveCareAppointment: false,

@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResultsByRegion.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -15,6 +14,7 @@ import 'package:provider/provider.dart';
import '../../../services/appointment_services/doctor_response_mapper.dart';
import '../../../services/authentication/auth_provider.dart';
import '../search_result/SearchResultWithTab.dart';
class SearchByDoctor extends StatefulWidget {
@override
@ -201,7 +201,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
Navigator.push(
context,
FadePage(
page: SearchResultsByRegion(
page: SearchResultWithTab(
doctorsList: [],
patientDoctorAppointmentListHospital: regionHospitalList,
isLiveCareAppointment: false,

@ -2,19 +2,13 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class ResultByDoctor extends StatelessWidget {
List<DoctorList> doctorsList = [];
List<DoctorList>? patientDoctorAppointmentListHospital;
Function(int) onDoctorSelected;
final bool isLiveCareAppointment;
final bool isObGyneAppointment;
final bool isDoctorNameSearch;
@ -23,7 +17,6 @@ class ResultByDoctor extends StatelessWidget {
ResultByDoctor(
{required this.doctorsList,
required this.patientDoctorAppointmentListHospital,
required this.onDoctorSelected,
required this.isLiveCareAppointment,
required this.isObGyneAppointment,
required this.isDoctorNameSearch,
@ -36,40 +29,41 @@ class ResultByDoctor extends StatelessWidget {
return SizedBox(
child: patientDoctorAppointmentListHospital?.isNotEmpty ==
true
? ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(),
separatorBuilder: (context, index) {
return Material(
color: Color(0xFFf5f5f5),
child: SizedBox(
height: 12,
),
);
},
itemBuilder: (context, index) {
final doctor = patientDoctorAppointmentListHospital![index];
? Padding(
padding: const EdgeInsets.all(12.0),
child: ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(),
separatorBuilder: (context, index) {
return Material(
color: Color(0xFFf5f5f5),
child: SizedBox(
height: 12,
),
);
},
itemBuilder: (context, index) {
final doctor = patientDoctorAppointmentListHospital![index];
return DoctorView(
doctor: doctor,
isLiveCareAppointment: isLiveCareAppointment,
isObGyneAppointment: isObGyneAppointment,
isDoctorNameSearch: isDoctorNameSearch,
obGyneProcedureListResponse: obGyneProcedureListResponse,
isShowDate: false,
onTap: () {
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_doctor(
appointment_type: 'regular', doctor: doctor);
});
},
itemCount: patientDoctorAppointmentListHospital?.length ??
0,
)
return DoctorView(
doctor: doctor,
isLiveCareAppointment: isLiveCareAppointment,
isObGyneAppointment: isObGyneAppointment,
isDoctorNameSearch: isDoctorNameSearch,
obGyneProcedureListResponse: obGyneProcedureListResponse,
isShowDate: false,
onTap: () {
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_doctor(
appointment_type: 'regular', doctor: doctor);
});
},
itemCount: patientDoctorAppointmentListHospital?.length ?? 0,
),
)
: getNoDataWidget(context),
);
}

@ -1,15 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
typedef OnFacilitySelected = Function(bool);
@ -29,23 +22,38 @@ class ResultByFacility extends StatelessWidget {
Widget build(BuildContext context) {
return Column(
children: [
HospitalTitle(
iconUrl: 'assets/images/svg/HMG.svg',
title: TranslationBase.of(context).hmgHospital,
isHMC: false,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}",
nearest: patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgDistance
InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgSize ==
0) return;
onFacilitySelected(false);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMG.svg',
title: TranslationBase.of(context).hmgHospital,
isHMC: false,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgDistance),
),
SizedBox(height: 16,),
HospitalTitle(
iconUrl: 'assets/images/svg/HMC.svg',
title: TranslationBase.of(context).hmcHospital,
isHMC: true,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}",
nearest: patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcDistance
InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcSize ==
0) return;
onFacilitySelected(false);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMC.svg',
title: TranslationBase.of(context).hmcHospital,
isHMC: true,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcDistance),
)
]);
}
@ -67,57 +75,87 @@ class HospitalTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SvgPicture.asset(iconUrl),
SizedBox(
width: 8,
),
Text(
title,
style: TextStyle(
fontSize: 18,
color: isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127),
fontWeight: FontWeight.w600),
return Material(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SvgPicture.asset(iconUrl),
SizedBox(
width: 8,
),
Text(
title,
style: TextStyle(
fontSize: 18,
color:
isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127),
fontWeight: FontWeight.w600),
),
],
),
SizedBox(
height: 6,
),
Row(
children: [
Text(
isHMC
? "${TranslationBase.of(context).hmcHospitalCount.replaceAll("@", itemCount)}"
: "${TranslationBase.of(context).hmgHospitalCount.replaceAll("@", itemCount)}",
style: TextStyle(
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.w600),
),
Visibility(
visible: nearest != double.infinity,
child: Row(
children: [
SizedBox(
width: 8,
),
Icon(
Icons.location_on,
color: Colors.black,
),
SizedBox(
width: 8,
),
Text(
"${TranslationBase.of(context).nearest}: $nearest ${TranslationBase.of(context).kilometerUnit}",
style: TextStyle(
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.w600),
),
],
),
),
],
),
],
),
],
),
SizedBox(
height: 6,
),
Row(
children: [
Text(
isHMC
? "${TranslationBase.of(context).hmcHospitalCount.replaceAll("@", itemCount)}"
: "${TranslationBase.of(context).hmgHospitalCount.replaceAll("@", itemCount)}",
style: TextStyle(
fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600),
),
Visibility(
visible: nearest != double.infinity,
child: Row(
children: [
SizedBox(width: 8,),
Icon(Icons.location_on, color: Colors.black,),
SizedBox(width: 8,),
Text(
"${TranslationBase.of(context).nearest}: $nearest",
style: TextStyle(
fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600),
),
],
),
Padding(
padding: EdgeInsets.all(8),
child: Center(
child: Icon(
Icons.arrow_forward_ios,
color: CustomColors.black,
size: 16,
),
),
],
),
],
),
],
),
),
);
}

@ -1,15 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
typedef OnHospitalSelected = Function(String, int);
@ -80,7 +73,7 @@ class HospitalBodyWidget extends StatelessWidget {
return ListView.separated(
addAutomaticKeepAlives: true,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
physics: BouncingScrollPhysics(),
itemCount: patientDoctorAppointmentListHospital?.length ?? 0,
separatorBuilder: (context, index) {
return Container(
@ -98,7 +91,8 @@ class HospitalBodyWidget extends StatelessWidget {
child: Material(
color: CustomColors.white,
child: Padding(
padding: const EdgeInsets.all(8.0),
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Row(
children: [
Expanded(
@ -132,7 +126,7 @@ class HospitalBodyWidget extends StatelessWidget {
width: 8,
),
Text(
"${TranslationBase.of(context).nearest}: ${patientDoctorAppointmentListHospital?[index].distanceInKMs}",
"${TranslationBase.of(context).nearest}: ${patientDoctorAppointmentListHospital?[index].distanceInKMs} ${TranslationBase.of(context).kilometerUnit}",
style: TextStyle(
fontSize: 14,
color: Colors.black,

@ -1,15 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
typedef OnRegionSelected = Function(String);
class ResultByRegion extends StatelessWidget {
List<DoctorList> doctorsList = [];
@ -88,8 +81,8 @@ class RegionTitle extends StatelessWidget {
return Material(
color: CustomColors.white,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Row(
children: [
Expanded(
child: Column(

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByDoctors.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByFacility.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByHospital.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByRegion.dart';
@ -65,144 +67,182 @@ class _SearchResultWithTabState extends State<SearchResultWithTab> {
body: widget.patientDoctorAppointmentListHospital
.registeredDoctorMap?.isNotEmpty ==
true
? SingleChildScrollView(
child: Column(children: <Widget>[
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 20, right: 20, top: 12),
child: Row(
children: [
Expanded(
child: showProgress(
title: TranslationBase
.of(context)
.selectRegion,
status: _currentIndex == 0
? TranslationBase
.of(context)
.inPrgress
: _currentIndex > 0
? TranslationBase
.of(context)
.completed
: TranslationBase
.of(context)
.locked,
color: _currentIndex == 0
? CustomColors.orange
: CustomColors.green,
),
),
Expanded(
child: showProgress(
title: TranslationBase
.of(context)
.selectFacitlity,
status: _currentIndex == 1
? TranslationBase
.of(context)
.inPrgress
: _currentIndex > 1
? TranslationBase
.of(context)
.completed
: TranslationBase
.of(context)
.locked,
color: _currentIndex == 1
? CustomColors.orange
: _currentIndex > 1
? CustomColors.green
: CustomColors.grey2,
),
? SizedBox(
height: SizeConfig.realScreenHeight! * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 20, right: 20, top: 12),
child: Row(
children: [
Expanded(
child: showProgress(
title: TranslationBase.of(context).selectRegion,
status: _currentIndex == 0
? TranslationBase.of(context).inPrgress
: _currentIndex > 0
? TranslationBase.of(context).completed
: TranslationBase.of(context).locked,
color: _currentIndex == 0
? CustomColors.orange
: CustomColors.green,
onTap: () {
setState(() {
selectedHospitalIndex = -1;
selectedRegion = "";
_currentIndex = 0;
changePageViewIndex(0);
});
}),
),
Expanded(
child: showProgress(
title: TranslationBase.of(context).selectFacitlity,
status: _currentIndex == 1
? TranslationBase.of(context).inPrgress
: _currentIndex > 1
? TranslationBase.of(context).completed
: TranslationBase.of(context).locked,
color: _currentIndex == 1
? CustomColors.orange
: _currentIndex > 1
? CustomColors.green
: CustomColors.grey2,
onTap: () {
setState(() {
selectedHospitalIndex = -1;
_currentIndex = 1;
changePageViewIndex(1);
});
}),
),
Expanded(
child: showProgress(
title: TranslationBase.of(context).selectBranch,
status: _currentIndex == 2
? TranslationBase.of(context).inPrgress
: _currentIndex > 1
? TranslationBase.of(context).completed
: TranslationBase.of(context).locked,
color: _currentIndex == 2
? CustomColors.orange
: _currentIndex > 2
? CustomColors.green
: CustomColors.grey2,
onTap: () {
setState(() {
selectedHospitalIndex = -1;
_currentIndex = 2;
changePageViewIndex(2);
});
}),
),
showProgress(
title: TranslationBase.of(context).selectDoctor,
status: _currentIndex == 3
? TranslationBase.of(context).inPrgress
: TranslationBase.of(context).locked,
color: _currentIndex == 3
? CustomColors.orange
: _currentIndex > 4
? CustomColors.green
: CustomColors.grey2,
isNeedBorder: false,
onTap: () {
setState(() {
_currentIndex = 3;
changePageViewIndex(3);
});
}),
],
),
showProgress(
title: TranslationBase
.of(context)
.selectBranch,
status: _currentIndex == 2 ? TranslationBase
.of(context)
.inPrgress : TranslationBase
.of(context)
.locked,
color: _currentIndex == 2
? CustomColors.orange
: _currentIndex > 3
? CustomColors.green
: CustomColors.grey2,
isNeedBorder: false,
),
showProgress(
title: TranslationBase
.of(context)
.selectDoctor,
status: _currentIndex == 3 ? TranslationBase
.of(context)
.inPrgress : TranslationBase
.of(context)
.locked,
color: _currentIndex == 3
? CustomColors.orange
: _currentIndex > 4
? CustomColors.green
: CustomColors.grey2,
isNeedBorder: false,
),
],
),
),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
ResultByRegion(doctorsList: widget.doctorsList,
patientDoctorAppointmentListHospital: widget
.patientDoctorAppointmentListHospital,
onRegionSelected: (key) {
setState(() {
selectedRegion = key;
});
}),
(selectedRegion != "")
?
ResultByFacility(doctorsList: widget.doctorsList,
patientDoctorAppointmentListHospital: widget
.patientDoctorAppointmentListHospital,
selectedRegion: selectedRegion,
onFacilitySelected: (isHMCSelected) {
),
mHeight(24),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
isHMCSelected = isHMCSelected;
_currentIndex = index;
});
},
) : SizedBox.shrink(),
(selectedRegion != '') ?
ResultByHospital(doctorsList: widget.doctorsList,
paitientDoctorAppointmentList: (isHMCSelected)?
widget.patientDoctorAppointmentListHospital
.registeredDoctorMap![selectedRegion]!.hmgDoctorList ?? []
: widget.patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgDoctorList ?? [],
isHMCSelected: isHMCSelected,
isLiveCareAppointment: widget.isLiveCareAppointment,
isDoctorSearchResult: widget.isDoctorSearchResult,
onHospitalSelected: (hospital,index) {
scrollDirection: Axis.horizontal,
children: <Widget>[
ResultByRegion(
doctorsList: widget.doctorsList,
patientDoctorAppointmentListHospital:
widget.patientDoctorAppointmentListHospital,
onRegionSelected: (key) {
setState(() {
selectedRegion = key;
_currentIndex = 1;
changePageViewIndex(1);
});
}),
(selectedRegion != "")
? ResultByFacility(
doctorsList: widget.doctorsList,
patientDoctorAppointmentListHospital:
widget.patientDoctorAppointmentListHospital,
selectedRegion: selectedRegion,
onFacilitySelected: (isHMCSelected) {
setState(() {
isHMCSelected = isHMCSelected;
_currentIndex = 2;
changePageViewIndex(2);
});
},
) : SizedBox.shrink(),
(selectedRegion != '') ?
ResultByHospital(doctorsList: widget.doctorsList,
paitientDoctorAppointmentList: (isHMCSelected) ?
widget.patientDoctorAppointmentListHospital
.registeredDoctorMap![selectedRegion]!
.hmgDoctorList ?? []
: widget.patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]
?.hmcDoctorList ?? [],
isHMCSelected: isHMCSelected,
isLiveCareAppointment: widget.isLiveCareAppointment,
isDoctorSearchResult: widget.isDoctorSearchResult,
onHospitalSelected: (hospital, index) {
setState(() {
selectedHospitalIndex = index;
});
}): SizedBox.shrink(),
],
),
_currentIndex = 3;
changePageViewIndex(3);
});
})
: SizedBox.shrink(),
(selectedRegion != '' && selectedHospitalIndex != -1)
? ResultByDoctor(
doctorsList: widget.doctorsList,
patientDoctorAppointmentListHospital: (isHMCSelected)
? widget
.patientDoctorAppointmentListHospital
.registeredDoctorMap![selectedRegion]!
.hmgDoctorList![selectedHospitalIndex]
.patientDoctorAppointmentList ??
[]
: widget
.patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]
?.hmcDoctorList?[
selectedHospitalIndex]
.patientDoctorAppointmentList ??
[],
isLiveCareAppointment:
widget.isLiveCareAppointment,
isDoctorSearchResult: widget.isDoctorSearchResult,
isObGyneAppointment: widget.isObGyneAppointment,
isDoctorNameSearch: widget.isDoctorNameSearch)
: SizedBox.shrink(),
],
),
]))
),
]),
)
: getNoDataWidget(context),);
}
@ -229,13 +269,17 @@ class _SearchResultWithTabState extends State<SearchResultWithTab> {
}
Widget showProgress(
{String? title, String? status, Color? color, bool isNeedBorder = true}) {
{String? title,
String? status,
Color? color,
bool isNeedBorder = true,
Function()? onTap}) {
return InkWell(
onTap: () {
if (status == TranslationBase
.of(context)
.completed) {
changePageViewIndex(_currentIndex);
onTap?.call();
}
},
child: Column(

@ -472,7 +472,8 @@ class _CallScreenState extends State<CallScreen> {
],
),
);
if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconncting) {
if (errorType == Errors.SessionJoinFailed ||
errorType == Errors.SessionDisconnecting) {
Timer(
const Duration(milliseconds: 1000),
() => Navigator.pop(context),

@ -1,17 +1,15 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/pages/login/register-info.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
class RegisterNew extends StatefulWidget {
@override
@ -117,7 +115,14 @@ class _RegisterNew extends State<RegisterNew> {
},
scrollDirection: Axis.horizontal,
children: <Widget>[
Register(
changePageViewIndex: changePageViewIndex,
),
RegisterInfo(
changePageViewIndex: changePageViewIndex,
),
RegisterInfo(changePageViewIndex: changePageViewIndex, page: 2),
// NewEReferralStepOnePage(
// changePageViewIndex: changePageViewIndex,
// createEReferralRequestModel: createEReferralRequestModel,

@ -40,6 +40,13 @@ class DoctorMapper{
if(regionDoctorList!.distance>element.projectDistanceInKiloMeters){
regionDoctorList!.distance = element.projectDistanceInKiloMeters;
}
if (element.isHMC == true &&
element.projectDistanceInKiloMeters <
regionDoctorList.hmcDistance)
regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters;
else if (element.projectDistanceInKiloMeters <
regionDoctorList.hmgDistance)
regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters;
}else
if (await sharedPref.getDouble(USER_LAT) != null && await sharedPref.getDouble(USER_LONG) != null && element.latitude != null && element.longitude != null) {
var lat = await sharedPref.getDouble(USER_LAT);
@ -51,11 +58,14 @@ class DoctorMapper{
}
if(regionDoctorList!.distance>distance){
regionDoctorList!.distance = distance;
if(element.isHMC == true)
regionDoctorList.hmcDistance = distance;
else
regionDoctorList.hmgDistance = distance;
}
if (element.isHMC == true &&
element.projectDistanceInKiloMeters <
regionDoctorList.hmcDistance)
regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters;
else if (element.projectDistanceInKiloMeters <
regionDoctorList.hmgDistance)
regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters;
print("the distance is $distance");
}
targetList?.add(newAppointment);

@ -70,7 +70,7 @@ class AppToast {
child: toast,
gravity: ToastGravity.TOP,
toastDuration: Duration(seconds: timeInSeconds),
positionedToastBuilder: (context, child,_) {
positionedToastBuilder: (context, child) {
return Positioned(top: 50, left: 10, right: 10, child: child);
});
// Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize);

@ -3277,6 +3277,8 @@ class TranslationBase {
String get hmgHospitalCount => localizedValues["hmgHospitalCount"][locale.languageCode];
String get nearest => localizedValues["nearest"][locale.languageCode];
String get kilometerUnit =>
localizedValues["kilometerUnit"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save