You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App_New/lib/presentation/hmg_services/services_page.dart

98 lines
3.2 KiB
Dart

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/core/utils/utils.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(
5,
"Comprehensive Checkup".needTranslation,
"".needTranslation,
AppAssets.comprehensiveCheckup,
true,
bgColor: AppColors.bgGreenColor,
textColor: AppColors.blackColor,
route: AppRoutes.comprehensiveCheckupPage,
),
HmgServicesComponentModel(
3,
"Home Health Care".needTranslation,
"".needTranslation,
AppAssets.emergency_services_icon,
true,
bgColor: AppColors.bgGreenColor,
textColor: AppColors.blackColor,
route: AppRoutes.homeHealthCarePage,
),
HmgServicesComponentModel(
11,
"Virtual Tour".needTranslation,
"".needTranslation,
AppAssets.my_address,
true,
bgColor: Colors.orange,
textColor: AppColors.blackColor,
route: null,
onTap:(){
Utils.openWebView(
url: 'https://hmgwebservices.com/vt_mobile/html/index.html',
);
},
)
];
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Explore Services".needTranslation,
isLeading: Navigator.canPop(context),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 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: 24.w,
mainAxisSpacing: 0.h,
childAspectRatio: 0.85,
),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: hmgServices.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return ServiceGridViewItem(hmgServices[index], index, false);
},
),
)
],
),
),
);
}
}