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.
63 lines
2.1 KiB
Dart
63 lines
2.1 KiB
Dart
import 'package:flutter/material.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/features/hmg_services/models/hmg_services.dart';
|
|
import 'package:hmg_patient_app_new/presentation/hmg_services/services_view.dart';
|
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
|
|
|
class ServicesPage extends StatefulWidget {
|
|
const ServicesPage({super.key});
|
|
|
|
@override
|
|
State<ServicesPage> createState() => _ServicesPageState();
|
|
}
|
|
|
|
class _ServicesPageState extends State<ServicesPage> {
|
|
List<HmgServices> hmgServices = [];
|
|
|
|
@override
|
|
void initState() {
|
|
hmgServices.add(HmgServices(11,"E Referral Services".needTranslation, "".needTranslation, "assets/images/svg/e-referral.svg", true, bgColor: Colors.orangeAccent, textColor: Colors.black, route: "/ereferralPage"));
|
|
super.initState();
|
|
}
|
|
|
|
@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,),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 16,
|
|
right: 16,
|
|
top: 0,
|
|
),
|
|
child: GridView.builder(
|
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
crossAxisCount: 4, // 4 icons per row
|
|
crossAxisSpacing: 16,
|
|
mainAxisSpacing: 24,
|
|
childAspectRatio: 0.75,
|
|
),
|
|
physics: NeverScrollableScrollPhysics(),
|
|
shrinkWrap: true,
|
|
itemCount: hmgServices.length,
|
|
padding: EdgeInsets.zero,
|
|
itemBuilder: (BuildContext context, int index) {
|
|
return ServiceGridView(hmgServices[index], index, false);
|
|
},
|
|
))
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|