|
|
|
@ -10,25 +10,28 @@ class HomePatientCard extends StatelessWidget {
|
|
|
|
|
final Color backgroundIconColor;
|
|
|
|
|
final String text;
|
|
|
|
|
final Color textColor;
|
|
|
|
|
final Function onTap;
|
|
|
|
|
final VoidCallback onTap;
|
|
|
|
|
final double iconSize;
|
|
|
|
|
|
|
|
|
|
HomePatientCard({
|
|
|
|
|
@required this.backgroundColor,
|
|
|
|
|
@required this.backgroundIconColor,
|
|
|
|
|
this.backgroundColor,
|
|
|
|
|
this.backgroundIconColor,
|
|
|
|
|
this.cardIcon,
|
|
|
|
|
this.cardIconImage,
|
|
|
|
|
@required this.text,
|
|
|
|
|
@required this.textColor,
|
|
|
|
|
@required this.onTap,
|
|
|
|
|
this.text,
|
|
|
|
|
this.textColor,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.iconSize = 30,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double width = SizeConfig.heightMultiplier*
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightLarge?15:13);
|
|
|
|
|
return HomePageCard(
|
|
|
|
|
color: backgroundColor,
|
|
|
|
|
margin: EdgeInsets.all(4),
|
|
|
|
|
width: width,
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121),
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Column(
|
|
|
|
@ -67,7 +70,8 @@ class HomePatientCard extends StatelessWidget {
|
|
|
|
|
cardIcon != null
|
|
|
|
|
? Icon(
|
|
|
|
|
cardIcon,
|
|
|
|
|
size: iconSize,
|
|
|
|
|
size:
|
|
|
|
|
SizeConfig.getWidthMultiplier(width: width) * 30,
|
|
|
|
|
color: textColor,
|
|
|
|
|
)
|
|
|
|
|
: Image.asset(
|
|
|
|
@ -90,7 +94,9 @@ class HomePatientCard extends StatelessWidget {
|
|
|
|
|
text,
|
|
|
|
|
color: textColor,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.6,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.getTextMultiplierBasedOnWidth(width: width) *
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 11 : 10),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|