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.
51 lines
1.9 KiB
Dart
51 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
import 'package:hmg_patient_app_new/core/dependencies.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/services/navigation_service.dart';
|
|
|
|
class ServiceGridViewItem extends StatelessWidget {
|
|
final HmgServicesComponentModel hmgServiceComponentModel;
|
|
final int index;
|
|
final bool isHomePage;
|
|
final bool isLocked;
|
|
|
|
const ServiceGridViewItem(this.hmgServiceComponentModel, this.index, this.isHomePage, {super.key, this.isLocked = false});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: () => getIt.get<NavigationService>().pushPageRoute(hmgServiceComponentModel.route),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
height: 48.h,
|
|
width: 48.w,
|
|
padding: EdgeInsets.zero,
|
|
margin: EdgeInsets.zero,
|
|
decoration: BoxDecoration(
|
|
color: hmgServiceComponentModel.bgColor,
|
|
borderRadius: BorderRadius.circular(12.r),
|
|
),
|
|
child: Utils.buildSvgWithAssets(
|
|
icon: hmgServiceComponentModel.icon,
|
|
height: 21.h,
|
|
width: 21.w,
|
|
fit: BoxFit.none,
|
|
),
|
|
),
|
|
SizedBox(height: 5.h),
|
|
hmgServiceComponentModel.title.toText12(
|
|
fontWeight: FontWeight.w500,
|
|
color: hmgServiceComponentModel.textColor,
|
|
maxLine: 1,
|
|
),
|
|
],
|
|
));
|
|
}
|
|
}
|