diff --git a/lib/screens/home/home_patient_card.dart b/lib/screens/home/home_patient_card.dart index bdaac7a7..6f6712ec 100644 --- a/lib/screens/home/home_patient_card.dart +++ b/lib/screens/home/home_patient_card.dart @@ -10,6 +10,7 @@ class HomePatientCard extends StatelessWidget { final String text; final Color textColor; final Function onTap; + final double iconSize; HomePatientCard({ @required this.backgroundColor, @@ -18,6 +19,7 @@ class HomePatientCard extends StatelessWidget { @required this.text, @required this.textColor, @required this.onTap, + this.iconSize = 30, }); @override @@ -41,7 +43,7 @@ class HomePatientCard extends StatelessWidget { height: 25.0, child: Icon( cardIcon, - size: 60, + size: iconSize * 2, color: backgroundIconColor, ), ), @@ -52,7 +54,7 @@ class HomePatientCard extends StatelessWidget { children: [ Icon( cardIcon, - size: 30, + size: iconSize, color: textColor, ), SizedBox( diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 85ea3506..ab0fe73f 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -329,6 +329,7 @@ class _HomeScreenState extends State { backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.livecare, textColor: textColors[colorIndex], + iconSize: 24, text: "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", onTap: () { diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index 297f358e..a7d03076 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -82,7 +82,12 @@ class AppDateUtils { double hoursInOneDay = difference.inHours / difference.inDays; - return (isShowDays?"$days ${TranslationBase.of(context).days},":"")+ "$hours ${TranslationBase.of(context).hr}, $minutes ${TranslationBase.of(context).min}"+ (isShowSecond?", $second Sec":""); + return (isShowDays + ? (days > 0 ? "$days ${TranslationBase.of(context).days}," : '') + : "") + + (hours > 0 ? "$hours ${TranslationBase.of(context).hr}," : "") + + " $minutes ${TranslationBase.of(context).min}" + + (isShowSecond ? ", $second Sec" : ""); } static String differenceBetweenServerDateAndCurrent(String str, BuildContext context) { diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 098cf1e2..6f218263 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -268,8 +268,7 @@ class PatientCard extends StatelessWidget { textOverflow: TextOverflow.ellipsis, ), ), - if(isFromLiveCare) - ShowTimer(patientInfo: patientInfo,), + if (patientInfo.gender == 1) Icon( DoctorApp.male_2, @@ -280,6 +279,9 @@ class PatientCard extends StatelessWidget { DoctorApp.female_1, color: Colors.pink, ), + + if(isFromLiveCare) + ShowTimer(patientInfo: patientInfo,), ]), ), Row(