buildItem method
Implementation
Widget buildItem(Product value, BuildContext context) {
return InkWell(
onTap: () {
Get.back();
homeController.navigationToScreen(value);
},
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: AppGradients.getByIndex(value.moduleId),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.08),
blurRadius: 10,
offset: const Offset(0, 6),
)
],
),
child: Center(
child: Icon(value.icon, size: 24, color: Colors.white),
),
),
// Card(
// color: Theme.of(context).canvasColor,
// shape: RoundedRectangleBorder(
// borderRadius: RadiusUtils.borderRadiusMedium,
// side: const BorderSide(
// color: Colors.grey,
// width: 0.2,
// ),
// ),
// child: InkWell(
// // customBorder: const CircleBorder(),
// onTap: () {
// Get.back();
// homeController.navigationToScreen(value);
// },
// child: Container(
// padding: const EdgeInsets.all(20.0),
// child: Icon(
// value.icon,
// size: 32, // Size of the icon
// color: value.iconColor, // Icon color
// ),
// ),
// ),
// ),
buildSizeHeight(10.0), // Space between circle and label
Text(
value.label,
textAlign: TextAlign.center,
maxLines: 2,
softWrap: true,
style: TextStyles.normal(context),
),
],
),
);
}