fixes and updates
parent
207b84e493
commit
3d226c39d0
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,75 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/size_utils.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/extensions/widget_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
|
|
||||||
|
class HealthToolsCard extends StatelessWidget {
|
||||||
|
final String label;
|
||||||
|
final Color textColor;
|
||||||
|
final String svgIcon;
|
||||||
|
final double? iconSize;
|
||||||
|
final Color? iconColor;
|
||||||
|
|
||||||
|
const HealthToolsCard({
|
||||||
|
super.key,
|
||||||
|
required this.label,
|
||||||
|
required this.textColor,
|
||||||
|
required this.svgIcon,
|
||||||
|
this.iconSize,
|
||||||
|
this.iconColor,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final iconS = iconSize ?? 24.w;
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||||
|
color: AppColors.whiteColor,
|
||||||
|
borderRadius: 20.r,
|
||||||
|
hasShadow: false,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(12.w),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Icon container with white background and border
|
||||||
|
Container(
|
||||||
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||||
|
color: AppColors.whiteColor,
|
||||||
|
borderRadius: 12.r,
|
||||||
|
side: BorderSide(
|
||||||
|
color: AppColors.borderOnlyColor.withValues(alpha: 0.1),
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 48.w,
|
||||||
|
width: 48.w,
|
||||||
|
child: Center(
|
||||||
|
child: Utils.buildSvgWithAssets(
|
||||||
|
icon: svgIcon,
|
||||||
|
width: iconS,
|
||||||
|
height: iconS,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
applyThemeColor: false,
|
||||||
|
iconColor: iconColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 6.h),
|
||||||
|
label.toText13(color: textColor, isBold: true, maxLine: 2),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue