diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart index da9b6306..4dc65cfa 100644 --- a/lib/models/Appointments/DoctorListResponse.dart +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -238,6 +238,7 @@ class PatientDoctorAppointmentList { List? patientDoctorAppointmentList = []; String? projectTopName = ""; String? projectBottomName = ""; + bool? isHMC; List hospitalList = []; PatientDoctorAppointmentList( @@ -246,7 +247,8 @@ class PatientDoctorAppointmentList { this.projectTopName, this.projectBottomName, DoctorList? patientDoctorAppointment, - HospitalsModel? model}) { + HospitalsModel? model, + this.isHMC = false}) { if (model != null) { hospitalList.add(model); } diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index 12cff848..97946268 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -61,6 +61,9 @@ class SearchResults extends StatelessWidget { TranslationBase.of(context).km : patientDoctorAppointmentListHospital[index].projectBottomName.toString(), isTitleSingleLine: false, + isHMC: patientDoctorAppointmentListHospital[index].isHMC ?? + false, + isForAppointmentSearch: true, isDoctorSearchResult: isDoctorSearchResult, isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, bodyWidget: ListView.separated( diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 61f3e239..7676b3d4 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -1,4 +1,3 @@ -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/SearchResults.dart'; @@ -13,10 +12,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; 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 _SearchByDoctorState createState() => _SearchByDoctorState(); @@ -141,7 +136,9 @@ class _SearchByDoctorState extends State { element.projectDistanceInKiloMeters.toString(), projectTopName: element.projectTopName, projectBottomName: element.projectBottomName, - patientDoctorAppointment: element)); + patientDoctorAppointment: element, + isHMC: element.isHMC, + )); } }); } else { diff --git a/lib/pages/BookAppointment/search_result/ResultByHospital.dart b/lib/pages/BookAppointment/search_result/ResultByHospital.dart index aecb78f8..65f19be0 100644 --- a/lib/pages/BookAppointment/search_result/ResultByHospital.dart +++ b/lib/pages/BookAppointment/search_result/ResultByHospital.dart @@ -44,7 +44,7 @@ class ResultByHospital extends StatelessWidget { isDoctorNameSearch: isDoctorNameSearch, isDoctorSearchResult: isDoctorSearchResult, onHospitalSelected: onHospitalSelected, - ), + isHMC: isHMCSelected), ), ], ); @@ -60,6 +60,7 @@ class HospitalBodyWidget extends StatelessWidget { final bool isDoctorSearchResult; final OBGyneProcedureListResponse? obGyneProcedureListResponse; final OnHospitalSelected onHospitalSelected; + final bool isHMC; const HospitalBodyWidget( {super.key, @@ -69,7 +70,8 @@ class HospitalBodyWidget extends StatelessWidget { required this.isDoctorNameSearch, required this.isDoctorSearchResult, this.obGyneProcedureListResponse, - required this.onHospitalSelected}); + required this.onHospitalSelected, + required this.isHMC}); @override Widget build(BuildContext context) { @@ -102,21 +104,38 @@ class HospitalBodyWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Directionality( - textDirection: - (context.read().isArabic == - true) - ? TextDirection.rtl - : TextDirection.ltr, - child: Text( - patientDoctorAppointmentListHospital![index] - .filterName ?? - '', - style: TextStyle( - fontSize: 22, - color: Colors.black, - fontWeight: FontWeight.w700), - ), + Row( + children: [ + Padding( + padding: const EdgeInsets.all(6.0), + child: SvgPicture.asset( + isHMC + ? 'assets/images/svg/HMC.svg' + : 'assets/images/svg/HMG.svg', + ), + ), + Expanded( + child: Directionality( + textDirection: (context + .read() + .isArabic == + true) + ? TextDirection.rtl + : TextDirection.ltr, + child: Text( + patientDoctorAppointmentListHospital![index] + .filterName ?? + '', + style: TextStyle( + fontSize: 22, + color: isHMC + ? Color(0xFF40ACC9) + : Color(0xFFD02127), + fontWeight: FontWeight.w700), + ), + ), + ), + ], ), SizedBox( height: 8, diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index f35dadba..a1d9393e 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; /// App Expandable Notifier with animation @@ -34,6 +35,8 @@ class AppExpandableNotifier extends StatefulWidget { final bool applyBackgroundColor; final bool applyBackgroundToOnlyHeader; final double? paddingValue; + final bool isHMC; + final bool isForAppointmentSearch; AppExpandableNotifier( {this.headerWidget, @@ -55,6 +58,8 @@ class AppExpandableNotifier extends StatefulWidget { this.headerRadius, this.applyBackgroundColor = true, this.applyBackgroundToOnlyHeader = false, + this.isHMC = false, + this.isForAppointmentSearch = false, this.paddingValue}); _AppExpandableNotifier createState() => _AppExpandableNotifier(); @@ -192,9 +197,38 @@ class _AppExpandableNotifier extends State { ), if (_title.isNotEmpty && !widget.isTitleSingleLine) - Text( - _title, - maxLines: 1, + (widget.isForAppointmentSearch) + ? Row( + children: [ + Padding( + padding: + const EdgeInsets.all(6.0), + child: SvgPicture.asset( + widget.isHMC + ? 'assets/images/svg/HMC.svg' + : 'assets/images/svg/HMG.svg', + ), + ), + Expanded( + child: Text( + _title, + maxLines: 1, + style: TextStyle( + fontSize: 24, + fontWeight: + FontWeight.w700, + color: widget.isHMC + ? Color(0xFF40ACC9) + : Color(0xFFD02127), + letterSpacing: -1.44, + height: 25 / 24), + ), + ), + ], + ) + : Text( + _title, + maxLines: 1, style: TextStyle( fontSize: 24, fontWeight: FontWeight.w700, diff --git a/pubspec.yaml b/pubspec.yaml index cececbe0..66feeb0a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -173,7 +173,7 @@ dependencies: auto_size_text: ^3.0.0 equatable: ^2.0.3 wave: ^0.2.0 - sms_otp_auto_verify: ^2.1.0 + sms_otp_auto_verify: ^2.2.0 # flutter_ios_voip_kit: ^0.1.0 google_api_availability: ^5.0.0 open_filex: ^4.3.2