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/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/size_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/authentication/authentication_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/chip/app_custom_chip_widget.dart'; class ServiceInfoPage extends StatelessWidget { final String serviceName; final String serviceHeader; final String serviceDescription; final String serviceImage; const ServiceInfoPage({required this.serviceName, required this.serviceHeader, required this.serviceDescription, required this.serviceImage, super.key}); @override Widget build(BuildContext context) { return CollapsingListView( title: "", child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppCustomChipWidget( richText: serviceName.toText14(color: AppColors.infoColor, weight: FontWeight.w500), backgroundColor: AppColors.infoColor.withAlpha(50), textColor: AppColors.infoColor, ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 24.h), serviceHeader.toText28(isBold: true, height: 1.4).paddingSymmetrical(24.h, 0.h), SizedBox(height: 24.h), serviceDescription.toText14(weight: FontWeight.w500, color: AppColors.greyTextColor).paddingSymmetrical(24.h, 0.h), SizedBox(height: 24.h), CustomButton( text: LocaleKeys.login.tr(context: context), onPressed: () { getIt().onLoginPressed(); }, backgroundColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 40.h, icon: AppAssets.login1, iconColor: AppColors.primaryRedColor, iconSize: 18.h, ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 36.h), ClipRRect( borderRadius: BorderRadius.circular(24.r), child: Transform.flip( flipX: getIt.get().isArabic(), child: Image.asset( serviceImage, fit: BoxFit.fitHeight, width: 520.w, ), ), ), ], ), ); } }