|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
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/core/utils/utils.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
@ -15,15 +17,11 @@ class RegionListItem extends StatelessWidget {
|
|
|
|
|
final String hmgCount;
|
|
|
|
|
final String subTitle;
|
|
|
|
|
|
|
|
|
|
const RegionListItem(
|
|
|
|
|
{super.key,
|
|
|
|
|
required this.title,
|
|
|
|
|
required this.subTitle,
|
|
|
|
|
required this.hmcCount,
|
|
|
|
|
required this.hmgCount});
|
|
|
|
|
const RegionListItem({super.key, required this.title, required this.subTitle, required this.hmcCount, required this.hmgCount});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
AppState appState = getIt.get<AppState>();
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
@ -40,18 +38,19 @@ class RegionListItem extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
spacing: 8.h,
|
|
|
|
|
children: [
|
|
|
|
|
placesCountItem(
|
|
|
|
|
AppAssets.hmg, hmgCount, " ${LocaleKeys.hospital.tr()}"),
|
|
|
|
|
placesCountItem(AppAssets.hmc, hmcCount,
|
|
|
|
|
" ${LocaleKeys.medicalCenters.tr()}"),
|
|
|
|
|
placesCountItem(AppAssets.hmg, hmgCount, " ${LocaleKeys.hospital.tr()}"),
|
|
|
|
|
placesCountItem(AppAssets.hmc, hmcCount, " ${LocaleKeys.medicalCenters.tr()}"),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
width: 18,
|
|
|
|
|
height: 13,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
Transform.flip(
|
|
|
|
|
flipX: appState.isArabic() ? true : false,
|
|
|
|
|
child: Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
width: 18,
|
|
|
|
|
height: 13,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -66,24 +65,14 @@ class RegionListItem extends StatelessWidget {
|
|
|
|
|
icon: svgPath,
|
|
|
|
|
iconHasColor: false,
|
|
|
|
|
richText: RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
text: count,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.h,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: AppColors.blackColor),
|
|
|
|
|
children: [
|
|
|
|
|
TextSpan(
|
|
|
|
|
text: title,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.h,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
color: AppColors.blackColor))
|
|
|
|
|
])),
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
text: count,
|
|
|
|
|
style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.blackColor),
|
|
|
|
|
children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.blackColor))])),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget get header => Column(
|
|
|
|
|
Widget get header => Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
|