fix live care icon size

merge-requests/724/head
Elham Rababah 5 years ago
parent f80215b6bb
commit 792c85e28a

@ -10,6 +10,7 @@ class HomePatientCard extends StatelessWidget {
final String text; final String text;
final Color textColor; final Color textColor;
final Function onTap; final Function onTap;
final double iconSize;
HomePatientCard({ HomePatientCard({
@required this.backgroundColor, @required this.backgroundColor,
@ -18,6 +19,7 @@ class HomePatientCard extends StatelessWidget {
@required this.text, @required this.text,
@required this.textColor, @required this.textColor,
@required this.onTap, @required this.onTap,
this.iconSize = 30,
}); });
@override @override
@ -41,7 +43,7 @@ class HomePatientCard extends StatelessWidget {
height: 25.0, height: 25.0,
child: Icon( child: Icon(
cardIcon, cardIcon,
size: 60, size: iconSize * 2,
color: backgroundIconColor, color: backgroundIconColor,
), ),
), ),
@ -52,7 +54,7 @@ class HomePatientCard extends StatelessWidget {
children: [ children: [
Icon( Icon(
cardIcon, cardIcon,
size: 30, size: iconSize,
color: textColor, color: textColor,
), ),
SizedBox( SizedBox(

@ -329,6 +329,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.livecare, cardIcon: DoctorApp.livecare,
textColor: textColors[colorIndex], textColor: textColors[colorIndex],
iconSize: 24,
text: text:
"${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () { onTap: () {

@ -82,7 +82,12 @@ class AppDateUtils {
double hoursInOneDay = difference.inHours / difference.inDays; 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) { static String differenceBetweenServerDateAndCurrent(String str, BuildContext context) {

@ -268,8 +268,7 @@ class PatientCard extends StatelessWidget {
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
), ),
), ),
if(isFromLiveCare)
ShowTimer(patientInfo: patientInfo,),
if (patientInfo.gender == 1) if (patientInfo.gender == 1)
Icon( Icon(
DoctorApp.male_2, DoctorApp.male_2,
@ -280,6 +279,9 @@ class PatientCard extends StatelessWidget {
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
if(isFromLiveCare)
ShowTimer(patientInfo: patientInfo,),
]), ]),
), ),
Row( Row(

Loading…
Cancel
Save