Feedback page implementation contd.

pull/101/head
Haroon Amjad 6 months ago
parent c88bff8cf2
commit 73b05276f6

@ -13,6 +13,7 @@ class ContactUsViewModel extends ChangeNotifier {
bool isHMGLocationsListLoading = false; bool isHMGLocationsListLoading = false;
bool isHMGHospitalsListSelected = true; bool isHMGHospitalsListSelected = true;
bool isLiveChatProjectsListLoading = false; bool isLiveChatProjectsListLoading = false;
bool isSendFeedbackTabSelected = true;
List<GetHMGLocationsModel> hmgHospitalsLocationsList = []; List<GetHMGLocationsModel> hmgHospitalsLocationsList = [];
List<GetHMGLocationsModel> hmgPharmacyLocationsList = []; List<GetHMGLocationsModel> hmgPharmacyLocationsList = [];
@ -44,6 +45,11 @@ class ContactUsViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
setIsSendFeedbackTabSelected(bool isSelected) {
isSendFeedbackTabSelected = isSelected;
notifyListeners();
}
Future<void> getHMGLocations({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getHMGLocations({Function(dynamic)? onSuccess, Function(String)? onError}) async {
isHMGLocationsListLoading = true; isHMGLocationsListLoading = true;
hmgHospitalsLocationsList.clear(); hmgHospitalsLocationsList.clear();

@ -29,103 +29,108 @@ class QuickLoginState extends State<QuickLogin> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
NavigationService navigationService = getIt.get<NavigationService>(); NavigationService navigationService = getIt.get<NavigationService>();
return Column( return Padding(
mainAxisSize: MainAxisSize.min, padding: EdgeInsets.all(24.h),
crossAxisAlignment: CrossAxisAlignment.center, child: Column(
children: [ mainAxisSize: MainAxisSize.min,
widget.isDone crossAxisAlignment: CrossAxisAlignment.center,
? Column( children: [
children: [ widget.isDone
Row( ? Column(
mainAxisAlignment: MainAxisAlignment.end, children: [
children: [ Row(
InkWell( mainAxisAlignment: MainAxisAlignment.end,
onTap: () { children: [
navigationService.pop(); InkWell(
onTap: () {
navigationService.pop();
},
child: Utils.buildSvgWithAssets(icon: AppAssets.cross_circle)),
],
),
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true),
LocaleKeys.allSet.tr().toText16(textAlign: TextAlign.center, weight: FontWeight.w500)
// Text(
// ' TranslationBase.of(context).allSet',
// textAlign: TextAlign.center,
// style: context.dynamicTextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w500,
// color: Colors.black,
// ),
// ),
],
)
: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(AppAssets.lockIcon, height: 100),
SizedBox(height: 10.h),
LocaleKeys.enableQuickLogin.tr().toText26(isBold: true),
// Text(
// ' TranslationBase.of(context).enableQuickLogin',
// style: context.dynamicTextStyle(
// fontSize: 26,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// ),
SizedBox(height: 5.h),
LocaleKeys.enableQuickLogin.tr().toText16(color: AppColors.quickLoginColor),
// Description
// Text(
// 'TranslationBase.of(context).enableMsg',
// style: context.dynamicTextStyle(
// fontSize: 16,
// color: Color(0xFF666666),
// height: 1.5,
// ),
//),
const SizedBox(height: 24),
// Buttons
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: CustomButton(
text: LocaleKeys.enableQuickLogin.tr(),
onPressed: () {
widget.onPressed();
}, },
child: Utils.buildSvgWithAssets(icon: AppAssets.cross_circle)), backgroundColor: Color(0xffED1C2B),
], borderColor: Color(0xffED1C2B),
), textColor: Colors.white,
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true), icon: AppAssets.apple_finder,
LocaleKeys.allSet.tr().toText16(textAlign: TextAlign.center, weight: FontWeight.w500) height: 56.h,
// Text( )),
// ' TranslationBase.of(context).allSet', ],
// textAlign: TextAlign.center, ),
// style: context.dynamicTextStyle( SizedBox(
// fontSize: 16, height: 16.h,
// fontWeight: FontWeight.w500, ),
// color: Colors.black, Row(
// ), mainAxisAlignment: MainAxisAlignment.end,
// ), children: [
], Expanded(
) child: CustomButton(
: Column( text: LocaleKeys.notNow.tr(),
mainAxisSize: MainAxisSize.min, onPressed: () {
crossAxisAlignment: CrossAxisAlignment.start, cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: false);
children: [ Navigator.pop(context, "true");
Image.asset(AppAssets.lockIcon, height: 100), },
SizedBox(height: 10.h), backgroundColor: Color(0xffFEE9EA),
LocaleKeys.enableQuickLogin.tr().toText26(isBold: true), borderColor: Color(0xffFEE9EA),
// Text( textColor: Colors.red,
// ' TranslationBase.of(context).enableQuickLogin', height: 56.h,
// style: context.dynamicTextStyle( // icon: "assets/images/svg/apple-finder.svg",
// fontSize: 26, )),
// fontWeight: FontWeight.bold, ],
// color: Colors.black, ),
// ), ],
// ), )
SizedBox(height: 5.h), ],
LocaleKeys.enableQuickLogin.tr().toText16(color: AppColors.quickLoginColor), ),
// Description
// Text(
// 'TranslationBase.of(context).enableMsg',
// style: context.dynamicTextStyle(
// fontSize: 16,
// color: Color(0xFF666666),
// height: 1.5,
// ),
//),
const SizedBox(height: 24),
// Buttons
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: CustomButton(
text: LocaleKeys.enableQuickLogin.tr(),
onPressed: () {
widget.onPressed();
},
backgroundColor: Color(0xffED1C2B),
borderColor: Color(0xffED1C2B),
textColor: Colors.white,
icon: AppAssets.apple_finder,
)),
],
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
child: CustomButton(
text: LocaleKeys.notNow.tr(),
onPressed: () {
cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: false);
Navigator.pop(context, "true");
},
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Colors.red,
// icon: "assets/images/svg/apple-finder.svg",
)),
],
),
],
)
],
); );
} }
} }

@ -37,7 +37,7 @@ class ClinicItem extends StatelessWidget {
Transform.flip( Transform.flip(
flipX: isArabic, flipX: isArabic,
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon_small,
width: 15.h, width: 15.h,
height: 15.h, height: 15.h,
fit: BoxFit.contain, fit: BoxFit.contain,

@ -140,8 +140,9 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
}, },
), ),
), ),
SizedBox(height: 10.h),
Transform.translate( Transform.translate(
offset: const Offset(0.0, -20.0), offset: const Offset(0.0, -10.0),
child: selectedDateDisplay.toText16(weight: FontWeight.w500), child: selectedDateDisplay.toText16(weight: FontWeight.w500),
), ),
//TODO: Add Next Day Span here //TODO: Add Next Day Span here

@ -10,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart'; import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/find_us_page.dart'; import 'package:hmg_patient_app_new/presentation/contact_us/find_us_page.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/live_chat_page.dart'; import 'package:hmg_patient_app_new/presentation/contact_us/live_chat_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -51,7 +52,14 @@ class ContactUs extends StatelessWidget {
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.feedback.tr(), LocaleKeys.feedback.tr(),
"Provide your feedback on our services".needTranslation, "Provide your feedback on our services".needTranslation,
), ).onPress(() {
Navigator.pop(context);
Navigator.of(context).push(
CustomPageRoute(
page: FeedbackPage(),
),
);
}),
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,

@ -0,0 +1,146 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:provider/provider.dart';
class FeedbackPage extends StatelessWidget {
FeedbackPage({super.key});
late ContactUsViewModel contactUsViewModel;
@override
Widget build(BuildContext context) {
contactUsViewModel = Provider.of<ContactUsViewModel>(context);
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: Column(
children: [
Expanded(
child: CollapsingListView(
title: LocaleKeys.feedback.tr(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
CustomTabBar(
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(null, "Send".needTranslation),
CustomTabBarModel(null, "Status".needTranslation),
],
onTabChange: (index) {
contactUsViewModel.setIsSendFeedbackTabSelected(index == 0);
},
).paddingSymmetrical(24.h, 0.h),
getSelectedTabWidget(context).paddingSymmetrical(24.h, 16.w),
],
),
),
),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
child: CustomButton(
text: LocaleKeys.submit.tr(context: context),
onPressed: () async {},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
icon: AppAssets.feedback,
iconColor: AppColors.whiteColor,
iconSize: 20.h,
).paddingSymmetrical(24.h, 24.h),
),
],
),
);
}
Widget getSelectedTabWidget(BuildContext context) {
if (contactUsViewModel.isSendFeedbackTabSelected) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.likeToHear.tr().toText14(weight: FontWeight.w500),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: false,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon, width: 24.w, height: 24.h, iconColor: AppColors.greyTextColor),
SizedBox(width: 12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.feedbackType.tr().toText16(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.select.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
],
),
Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h),
],
).onPress(() {
showCommonBottomSheetWithoutHeight(context,
title: "Select Feedback Type".needTranslation, child: Container(), callBackFunc: () {}, isFullScreen: false, isCloseButtonVisible: true);
}),
],
),
),
),
SizedBox(height: 16.h),
TextInputWidget(
labelText: "Subject".needTranslation,
hintText: "Type subject here".needTranslation,
// controller: searchEditingController,
isEnable: true,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
keyboardType: TextInputType.text,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
horizontal: ResponsiveExtension(15).h,
),
),
SizedBox(height: 16.h),
],
);
} else {
return Container();
}
}
}

@ -35,117 +35,115 @@ class LiveChatPage extends StatelessWidget {
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.liveChat.tr(), title: LocaleKeys.liveChat.tr(),
child: Consumer<ContactUsViewModel>(builder: (context, contactUsVM, child) { child: Column(
return Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ SizedBox(height: 16.h),
SizedBox(height: 16.h), ListView.separated(
ListView.separated( padding: EdgeInsets.only(top: 16.h),
padding: EdgeInsets.only(top: 16.h), shrinkWrap: true,
shrinkWrap: true, physics: NeverScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(), itemCount: contactUsVM.isLiveChatProjectsListLoading ? 5 : contactUsVM.liveChatProjectsList.length,
itemCount: contactUsVM.isLiveChatProjectsListLoading ? 5 : contactUsVM.liveChatProjectsList.length, itemBuilder: (context, index) {
itemBuilder: (context, index) { return contactUsVM.isLiveChatProjectsListLoading
return contactUsVM.isLiveChatProjectsListLoading ? Container(
? Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), child: Container(
child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor,
color: AppColors.whiteColor, borderRadius: 20.h,
borderRadius: 20.h, hasShadow: true,
hasShadow: true, ),
), child: Padding(
child: Padding( padding: EdgeInsets.all(14.h),
padding: EdgeInsets.all(14.h), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Image.network(
Image.network( "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", width: 63.h,
width: 63.h, height: 63.h,
height: 63.h, fit: BoxFit.cover,
fit: BoxFit.cover, ).circle(100).toShimmer2(isShow: true),
).circle(100).toShimmer2(isShow: true), SizedBox(width: 16.h),
SizedBox(width: 16.h), Expanded(
Expanded( child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ "Dr John Smith".toText16(isBold: true).toShimmer2(isShow: true),
"Dr John Smith".toText16(isBold: true).toShimmer2(isShow: true), SizedBox(height: 8.h),
SizedBox(height: 8.h), Wrap(
Wrap( direction: Axis.horizontal,
direction: Axis.horizontal, spacing: 3.h,
spacing: 3.h, runSpacing: 4.h,
runSpacing: 4.h, children: [
children: [ AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h),
AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h), AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h),
AppCustomChipWidget(labelText: "").toShimmer2(isShow: true, width: 16.h), ],
], ),
), ],
],
),
), ),
], ),
), ],
], ),
), ],
), ),
), ),
).paddingSymmetrical(24.h, 0.h) ),
: AnimationConfiguration.staggeredList( ).paddingSymmetrical(24.h, 0.h)
position: index, : AnimationConfiguration.staggeredList(
duration: const Duration(milliseconds: 500), position: index,
child: SlideAnimation( duration: const Duration(milliseconds: 500),
verticalOffset: 100.0, child: SlideAnimation(
child: FadeInAnimation( verticalOffset: 100.0,
child: AnimatedContainer( child: FadeInAnimation(
duration: Duration(milliseconds: 300), child: AnimatedContainer(
curve: Curves.easeInOut, duration: Duration(milliseconds: 300),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), curve: Curves.easeInOut,
child: DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( child: DecoratedBox(
color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.primaryRedColor : AppColors.whiteColor, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 16.r, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.primaryRedColor : AppColors.whiteColor,
hasShadow: false, borderRadius: 16.r,
), hasShadow: false,
child: Row( ),
mainAxisAlignment: MainAxisAlignment.spaceBetween, child: Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM") children: [
.needTranslation ("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor), .needTranslation
Transform.flip( .toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor),
flipX: getIt.get<AppState>().isArabic(), Transform.flip(
child: Utils.buildSvgWithAssets( flipX: getIt.get<AppState>().isArabic(),
icon: AppAssets.forward_arrow_icon_small, child: Utils.buildSvgWithAssets(
iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor, icon: AppAssets.forward_arrow_icon_small,
width: 18.h, iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor,
height: 13.h, width: 18.h,
fit: BoxFit.contain, height: 13.h,
), fit: BoxFit.contain,
), ),
], ),
).paddingSymmetrical(16.h, 16.h), ],
).onPress(() { ).paddingSymmetrical(16.h, 16.h),
contactUsVM.setSelectedLiveChatProjectIndex(index); ).onPress(() {
chatURL = contactUsVM.setSelectedLiveChatProjectIndex(index);
"https://chat.hmg.com/Index.aspx?Name=${appState.getAuthenticatedUser()!.firstName}&PatientID=${appState.getAuthenticatedUser()!.patientId}&MobileNo=${appState.getAuthenticatedUser()!.mobileNumber}&Language=${appState.isArabic() ? 'ar' : 'en'}&WorkGroup=${contactUsVM.liveChatProjectsList[index].value}"; chatURL =
debugPrint("Chat URL: $chatURL"); "https://chat.hmg.com/Index.aspx?Name=${appState.getAuthenticatedUser()!.firstName}&PatientID=${appState.getAuthenticatedUser()!.patientId}&MobileNo=${appState.getAuthenticatedUser()!.mobileNumber}&Language=${appState.isArabic() ? 'ar' : 'en'}&WorkGroup=${contactUsVM.liveChatProjectsList[index].value}";
}), debugPrint("Chat URL: $chatURL");
).paddingSymmetrical(24.h, 0.h), }),
), ).paddingSymmetrical(24.h, 0.h),
), ),
); ),
}, );
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), },
), separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
SizedBox(height: 24.h), ),
], SizedBox(height: 24.h),
); ],
}), ),
), ),
), ),
Container( Container(

@ -37,7 +37,7 @@ class AppColors {
static const Color warningColorYellow = Color(0xFFF4A308); static const Color warningColorYellow = Color(0xFFF4A308);
static const Color blackBgColor = Color(0xFF2E3039); static const Color blackBgColor = Color(0xFF2E3039);
static const blackColor = textColor; static const blackColor = textColor;
static const Color inputLabelTextColor = Color(0xff898A8D); static const Color inputLabelTextColor = Color(0xff898A8D);
static const Color greyTextColor = Color(0xFF8F9AA3); static const Color greyTextColor = Color(0xFF8F9AA3);
static const Color lightGrayBGColor = Color(0x142E3039); static const Color lightGrayBGColor = Color(0x142E3039);

@ -54,7 +54,7 @@ class CollapsingListView extends StatelessWidget {
SliverAppBar( SliverAppBar(
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
pinned: true, pinned: true,
expandedHeight: MediaQuery.of(context).size.height * 0.12.h, expandedHeight: MediaQuery.of(context).size.height * 0.11.h,
stretch: true, stretch: true,
systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
surfaceTintColor: Colors.transparent, surfaceTintColor: Colors.transparent,
@ -92,8 +92,7 @@ class CollapsingListView extends StatelessWidget {
t, t,
)!, )!,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: appState.isArabic() ? 0 : leftPadding, right: appState.isArabic() ? leftPadding : 0, bottom: bottomPadding),
left: appState.isArabic() ? 0 : leftPadding, right: appState.isArabic() ? leftPadding : 0, bottom: bottomPadding),
child: Row( child: Row(
spacing: 4.h, spacing: 4.h,
children: [ children: [
@ -110,18 +109,11 @@ class CollapsingListView extends StatelessWidget {
color: AppColors.blackColor, color: AppColors.blackColor,
letterSpacing: -0.5), letterSpacing: -0.5),
).expanded, ).expanded,
if (logout != null) if (logout != null) actionButton(context, t, title: "Logout".needTranslation, icon: AppAssets.logout).onPress(logout!),
actionButton(context, t, title: "Logout".needTranslation, icon: AppAssets.logout).onPress(logout!), if (report != null) actionButton(context, t, title: "Report".needTranslation, icon: AppAssets.report_icon).onPress(report!),
if (report != null) if (history != null) actionButton(context, t, title: "History".needTranslation, icon: AppAssets.insurance_history_icon).onPress(history!),
actionButton(context, t, title: "Report".needTranslation, icon: AppAssets.report_icon).onPress(report!), if (instructions != null) actionButton(context, t, title: "Instructions".needTranslation, icon: AppAssets.requests).onPress(instructions!),
if (history != null) if (requests != null) actionButton(context, t, title: "Requests".needTranslation, icon: AppAssets.insurance_history_icon).onPress(requests!),
actionButton(context, t, title: "History".needTranslation, icon: AppAssets.insurance_history_icon)
.onPress(history!),
if (instructions != null)
actionButton(context, t, title: "Instructions".needTranslation, icon: AppAssets.requests).onPress(instructions!),
if (requests != null)
actionButton(context, t, title: "Requests".needTranslation, icon: AppAssets.insurance_history_icon)
.onPress(requests!),
if (search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(search!).paddingOnly(right: 24), if (search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(search!).paddingOnly(right: 24),
if (trailing != null) trailing!, if (trailing != null) trailing!,
], ],

@ -205,9 +205,7 @@ class TextInputWidget extends StatelessWidget {
initialDate: DateTime.now(), initialDate: DateTime.now(),
fontFamily: appState.getLanguageCode() == "ar" ? "GESSTwo" : "Poppins", fontFamily: appState.getLanguageCode() == "ar" ? "GESSTwo" : "Poppins",
okWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.confirm, width: 24.h, height: 24.h)), okWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.confirm, width: 24.h, height: 24.h)),
cancelWidget: Padding( cancelWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.cancel, iconColor: Colors.white, width: 24.h, height: 24.h)),
padding: EdgeInsets.only(right: 8.h),
child: Utils.buildSvgWithAssets(icon: AppAssets.cancel, iconColor: Colors.white, width: 24.h, height: 24.h)),
onCalendarTypeChanged: (bool value) { onCalendarTypeChanged: (bool value) {
isGregorian = value; isGregorian = value;
}); });

Loading…
Cancel
Save