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_view.dart

63 lines
2.0 KiB
Dart

import 'package:flutter/material.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/hmg_services.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
class ServiceGridView extends StatelessWidget {
HmgServices hmgServices;
int index;
bool isHomePage;
bool isLocked;
ServiceGridView(this.hmgServices, this.index, this.isHomePage, {super.key, this.isLocked = false});
static final NavigationService _navigationService = getIt.get<NavigationService>();
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
_navigationService.pushAndReplace(hmgServices.route);
},
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 48,
width: 48,
padding: EdgeInsets.all(0),
margin: EdgeInsets.all(0),
decoration: BoxDecoration(
color: hmgServices.bgColor,
borderRadius: BorderRadius.circular(12),
),
child:Utils.buildSvgWithAssets (
icon: hmgServices.icon,
height: 21,
width: 21,
fit: BoxFit.none,
),
),
const SizedBox(height: 5),
hmgServices.title.toText12(
fontWeight: FontWeight.w500,
color:hmgServices.textColor,
),
// Text(
// hmgServices.subTitle,
// textAlign: TextAlign.left,
// style: TextStyle(
// fontSize: 14,
// fontWeight: FontWeight.w500,
// color: hmgServices.textColor,
// )),
// )
],
));
}
}