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

dev_v3.13.6_deep_link
taha.alam 7 months ago
parent 5dbd97aa46
commit 4b40d5d5a0

@ -238,6 +238,7 @@ class PatientDoctorAppointmentList {
List<DoctorList>? patientDoctorAppointmentList = [];
String? projectTopName = "";
String? projectBottomName = "";
bool? isHMC;
List<HospitalsModel> 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);
}

@ -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(

@ -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<SearchByDoctor> {
element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
patientDoctorAppointment: element,
isHMC: element.isHMC,
));
}
});
} else {

@ -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<ProjectViewModel>().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<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(
height: 8,

@ -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<AppExpandableNotifier> {
),
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,

@ -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

Loading…
Cancel
Save