WD: Color of hospital name will be as of the type of it.

merge-update-with-lab-changes
taha.alam 11 months ago
parent 5dbd97aa46
commit 4b40d5d5a0

@ -238,6 +238,7 @@ class PatientDoctorAppointmentList {
List<DoctorList>? patientDoctorAppointmentList = []; List<DoctorList>? patientDoctorAppointmentList = [];
String? projectTopName = ""; String? projectTopName = "";
String? projectBottomName = ""; String? projectBottomName = "";
bool? isHMC;
List<HospitalsModel> hospitalList = []; List<HospitalsModel> hospitalList = [];
PatientDoctorAppointmentList( PatientDoctorAppointmentList(
@ -246,7 +247,8 @@ class PatientDoctorAppointmentList {
this.projectTopName, this.projectTopName,
this.projectBottomName, this.projectBottomName,
DoctorList? patientDoctorAppointment, DoctorList? patientDoctorAppointment,
HospitalsModel? model}) { HospitalsModel? model,
this.isHMC = false}) {
if (model != null) { if (model != null) {
hospitalList.add(model); hospitalList.add(model);
} }

@ -61,6 +61,9 @@ class SearchResults extends StatelessWidget {
TranslationBase.of(context).km TranslationBase.of(context).km
: patientDoctorAppointmentListHospital[index].projectBottomName.toString(), : patientDoctorAppointmentListHospital[index].projectBottomName.toString(),
isTitleSingleLine: false, isTitleSingleLine: false,
isHMC: patientDoctorAppointmentListHospital[index].isHMC ??
false,
isForAppointmentSearch: true,
isDoctorSearchResult: isDoctorSearchResult, isDoctorSearchResult: isDoctorSearchResult,
isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false,
bodyWidget: ListView.separated( bodyWidget: ListView.separated(

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.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:flutter/material.dart';
import 'package:provider/provider.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 { class SearchByDoctor extends StatefulWidget {
@override @override
_SearchByDoctorState createState() => _SearchByDoctorState(); _SearchByDoctorState createState() => _SearchByDoctorState();
@ -141,7 +136,9 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
element.projectDistanceInKiloMeters.toString(), element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName, projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName, projectBottomName: element.projectBottomName,
patientDoctorAppointment: element)); patientDoctorAppointment: element,
isHMC: element.isHMC,
));
} }
}); });
} else { } else {

@ -44,7 +44,7 @@ class ResultByHospital extends StatelessWidget {
isDoctorNameSearch: isDoctorNameSearch, isDoctorNameSearch: isDoctorNameSearch,
isDoctorSearchResult: isDoctorSearchResult, isDoctorSearchResult: isDoctorSearchResult,
onHospitalSelected: onHospitalSelected, onHospitalSelected: onHospitalSelected,
), isHMC: isHMCSelected),
), ),
], ],
); );
@ -60,6 +60,7 @@ class HospitalBodyWidget extends StatelessWidget {
final bool isDoctorSearchResult; final bool isDoctorSearchResult;
final OBGyneProcedureListResponse? obGyneProcedureListResponse; final OBGyneProcedureListResponse? obGyneProcedureListResponse;
final OnHospitalSelected onHospitalSelected; final OnHospitalSelected onHospitalSelected;
final bool isHMC;
const HospitalBodyWidget( const HospitalBodyWidget(
{super.key, {super.key,
@ -69,7 +70,8 @@ class HospitalBodyWidget extends StatelessWidget {
required this.isDoctorNameSearch, required this.isDoctorNameSearch,
required this.isDoctorSearchResult, required this.isDoctorSearchResult,
this.obGyneProcedureListResponse, this.obGyneProcedureListResponse,
required this.onHospitalSelected}); required this.onHospitalSelected,
required this.isHMC});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -102,21 +104,38 @@ class HospitalBodyWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Directionality( Row(
textDirection: children: [
(context.read<ProjectViewModel>().isArabic == Padding(
true) padding: const EdgeInsets.all(6.0),
? TextDirection.rtl child: SvgPicture.asset(
: TextDirection.ltr, isHMC
child: Text( ? 'assets/images/svg/HMC.svg'
patientDoctorAppointmentListHospital![index] : 'assets/images/svg/HMG.svg',
.filterName ?? ),
'', ),
style: TextStyle( Expanded(
fontSize: 22, child: Directionality(
color: Colors.black, textDirection: (context
fontWeight: FontWeight.w700), .read<ProjectViewModel>()
), .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( SizedBox(
height: 8, height: 8,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:expandable/expandable.dart'; import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
/// App Expandable Notifier with animation /// App Expandable Notifier with animation
@ -34,6 +35,8 @@ class AppExpandableNotifier extends StatefulWidget {
final bool applyBackgroundColor; final bool applyBackgroundColor;
final bool applyBackgroundToOnlyHeader; final bool applyBackgroundToOnlyHeader;
final double? paddingValue; final double? paddingValue;
final bool isHMC;
final bool isForAppointmentSearch;
AppExpandableNotifier( AppExpandableNotifier(
{this.headerWidget, {this.headerWidget,
@ -55,6 +58,8 @@ class AppExpandableNotifier extends StatefulWidget {
this.headerRadius, this.headerRadius,
this.applyBackgroundColor = true, this.applyBackgroundColor = true,
this.applyBackgroundToOnlyHeader = false, this.applyBackgroundToOnlyHeader = false,
this.isHMC = false,
this.isForAppointmentSearch = false,
this.paddingValue}); this.paddingValue});
_AppExpandableNotifier createState() => _AppExpandableNotifier(); _AppExpandableNotifier createState() => _AppExpandableNotifier();
@ -192,9 +197,38 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
), ),
if (_title.isNotEmpty && if (_title.isNotEmpty &&
!widget.isTitleSingleLine) !widget.isTitleSingleLine)
Text( (widget.isForAppointmentSearch)
_title, ? Row(
maxLines: 1, 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( style: TextStyle(
fontSize: 24, fontSize: 24,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,

@ -173,7 +173,7 @@ dependencies:
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
equatable: ^2.0.3 equatable: ^2.0.3
wave: ^0.2.0 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 # flutter_ios_voip_kit: ^0.1.0
google_api_availability: ^5.0.0 google_api_availability: ^5.0.0
open_filex: ^4.3.2 open_filex: ^4.3.2

Loading…
Cancel
Save