|
|
|
@ -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.cardIcon,
|
|
|
|
|
this.backgroundColor,
|
|
|
|
|
this.backgroundIconColor,
|
|
|
|
|
this.cardIcon,
|
|
|
|
|
this.cardIconImage,
|
|
|
|
|
@required this.text,
|
|
|
|
|
@required this.textColor,
|
|
|
|
|
@required this.onTap,
|
|
|
|
|
this.iconSize = 30,
|
|
|
|
|
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(
|
|
|
|
@ -43,21 +46,21 @@ class HomePatientCard extends StatelessWidget {
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
child: cardIcon != null
|
|
|
|
|
? Icon(
|
|
|
|
|
cardIcon,
|
|
|
|
|
size: iconSize * 2,
|
|
|
|
|
color: backgroundIconColor,
|
|
|
|
|
)
|
|
|
|
|
cardIcon,
|
|
|
|
|
size: iconSize * 2,
|
|
|
|
|
color: backgroundIconColor,
|
|
|
|
|
)
|
|
|
|
|
: IconButton(
|
|
|
|
|
icon: Image.asset(
|
|
|
|
|
'assets/images/patient_register.png',
|
|
|
|
|
width: iconSize * 2,
|
|
|
|
|
height: iconSize * 2,
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
|
),
|
|
|
|
|
iconSize: iconSize * 2,
|
|
|
|
|
color: backgroundIconColor,
|
|
|
|
|
onPressed: () => null,
|
|
|
|
|
),
|
|
|
|
|
icon: Image.asset(
|
|
|
|
|
'assets/images/patient_register.png',
|
|
|
|
|
width: iconSize * 2,
|
|
|
|
|
height: iconSize * 2,
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
|
),
|
|
|
|
|
iconSize: iconSize * 2,
|
|
|
|
|
color: backgroundIconColor,
|
|
|
|
|
onPressed: () => null,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
@ -66,15 +69,16 @@ class HomePatientCard extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
cardIcon != null
|
|
|
|
|
? Icon(
|
|
|
|
|
cardIcon,
|
|
|
|
|
size: iconSize,
|
|
|
|
|
color: textColor,
|
|
|
|
|
)
|
|
|
|
|
cardIcon,
|
|
|
|
|
size:
|
|
|
|
|
SizeConfig.getWidthMultiplier(width: width) * 30,
|
|
|
|
|
color: textColor,
|
|
|
|
|
)
|
|
|
|
|
: Image.asset(
|
|
|
|
|
cardIconImage,
|
|
|
|
|
height: iconSize,
|
|
|
|
|
width: iconSize,
|
|
|
|
|
),
|
|
|
|
|
cardIconImage,
|
|
|
|
|
height: iconSize,
|
|
|
|
|
width: iconSize,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
@ -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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|