|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/hmg_services_component_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/hmg_services/services_view.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
|
|
|
|
|
|
|
|
|
class ServicesPage extends StatelessWidget {
|
|
|
|
|
ServicesPage({super.key});
|
|
|
|
|
|
|
|
|
|
final List<HmgServicesComponentModel> hmgServices = [
|
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
|
11,
|
|
|
|
|
"E Referral Services".needTranslation,
|
|
|
|
|
"".needTranslation,
|
|
|
|
|
AppAssets.eReferral,
|
|
|
|
|
true,
|
|
|
|
|
bgColor: Colors.orange,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
route: AppRoutes.eReferralPage,
|
|
|
|
|
),
|
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
|
12,
|
|
|
|
|
"Comprehensive Checkup".needTranslation,
|
|
|
|
|
"".needTranslation,
|
|
|
|
|
AppAssets.comprehensiveCheckup,
|
|
|
|
|
true,
|
|
|
|
|
bgColor: AppColors.bgGreenColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
route: AppRoutes.comprehensiveCheckupPage,
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return CollapsingListView(
|
|
|
|
|
title: "Explore Services".needTranslation,
|
|
|
|
|
isLeading: false,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(24.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Medical & Care Services".needTranslation.toText18(isBold: true),
|
|
|
|
|
SizedBox(height: 20.h),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 0),
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 3, // 4 icons per row
|
|
|
|
|
crossAxisSpacing: 16.w,
|
|
|
|
|
mainAxisSpacing: 24.h,
|
|
|
|
|
childAspectRatio: 0.75,
|
|
|
|
|
),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: hmgServices.length,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return ServiceGridViewItem(hmgServices[index], index, false);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|