From 1f8a90e47b85f03bbedc91ca7eac3f22880cf641 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 6 Jun 2021 17:15:52 +0300 Subject: [PATCH] add letterspaceing --- lib/screens/home/home_patient_card.dart | 2 +- lib/screens/home/home_screen.dart | 4 ++-- lib/screens/home/home_screen_header.dart | 3 +++ lib/screens/home/label.dart | 3 +++ lib/widgets/dashboard/activity_card.dart | 2 ++ lib/widgets/dashboard/out_patient_stack.dart | 8 ++++--- .../profile/profile-welcome-widget.dart | 3 --- lib/widgets/shared/app_texts_widget.dart | 21 ++++++++++--------- 8 files changed, 27 insertions(+), 19 deletions(-) diff --git a/lib/screens/home/home_patient_card.dart b/lib/screens/home/home_patient_card.dart index 3a7ded81..16877677 100644 --- a/lib/screens/home/home_patient_card.dart +++ b/lib/screens/home/home_patient_card.dart @@ -27,7 +27,7 @@ class HomePatientCard extends StatelessWidget { return HomePageCard( color: backgroundColor, width: width, - margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.6), + margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121), child: Container( padding: EdgeInsets.all(8), child: Column( diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 75e02aa4..9b50e8c7 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -99,7 +99,7 @@ class _HomeScreenState extends State { // ), model.dashboardItemsList.length > 0 ? FractionallySizedBox( - widthFactor: 0.90, + widthFactor: 0.94, child: Container( child: Column( mainAxisAlignment: MainAxisAlignment.start, @@ -131,7 +131,7 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.only( topRight: Radius.circular(70), )), - padding: EdgeInsets.only(left: 20, top: 10, right: 20), + padding: EdgeInsets.only(left: 10, top: 10, right: 10), margin: EdgeInsets.only(top: 10), child: Column( mainAxisAlignment: MainAxisAlignment.start, diff --git a/lib/screens/home/home_screen_header.dart b/lib/screens/home/home_screen_header.dart index 263d332f..7284b659 100644 --- a/lib/screens/home/home_screen_header.dart +++ b/lib/screens/home/home_screen_header.dart @@ -158,6 +158,9 @@ class _HomeScreenHeaderState extends State { .size .width * .6) * (SizeConfig.isWidthLarge?4:5), color: Color(0xFF2B353E), + maxLines: 1, + maxLength: 2, + letterSpacing: -0.96, textOverflow: TextOverflow .ellipsis, fontWeight: diff --git a/lib/screens/home/label.dart b/lib/screens/home/label.dart index 221215c0..7e853323 100644 --- a/lib/screens/home/label.dart +++ b/lib/screens/home/label.dart @@ -28,6 +28,7 @@ class Label extends StatelessWidget { // fontWeight: FontWeight.bold, color: color, fontHeight: .5, + letterSpacing: -0.72, fontWeight: FontWeight.w600, ), AppText( @@ -35,6 +36,8 @@ class Label extends StatelessWidget { color: color, fontSize: secondLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?4:6.40), fontWeight: FontWeight.bold, + letterSpacing: -1.44, + ), ], ); diff --git a/lib/widgets/dashboard/activity_card.dart b/lib/widgets/dashboard/activity_card.dart index 71fcad7f..22d08932 100644 --- a/lib/widgets/dashboard/activity_card.dart +++ b/lib/widgets/dashboard/activity_card.dart @@ -30,6 +30,7 @@ class GetActivityCard extends StatelessWidget { fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* 25, fontWeight: FontWeight.bold, color: Color(0xFF2B353E), + letterSpacing: -0.93, ), AppText( value.kPIParameter, @@ -38,6 +39,7 @@ class GetActivityCard extends StatelessWidget { color: Color(0xFF2B353E), textAlign: TextAlign.start, fontWeight: FontWeight.w700, + letterSpacing: -0.33, ), ], ), diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart index 387c2625..0405b5b7 100644 --- a/lib/widgets/dashboard/out_patient_stack.dart +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -65,7 +65,7 @@ class GetOutPatientStack extends StatelessWidget { colors: [Color(0x8FF5F6FA), Colors.red[50]], // red to yellow tileMode: TileMode.mirror, // repeats the gradient over the canvas ), - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(4), // color: Colors.red[50], ), child: Stack(children: [ @@ -78,7 +78,7 @@ class GetOutPatientStack extends StatelessWidget { padding: EdgeInsets.all(10), height: max != 0 ? ((barHeight )* value.value) / max : 0, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(4), color: Color(0x63D02127), ), ), @@ -99,13 +99,15 @@ class GetOutPatientStack extends StatelessWidget { fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, textAlign: TextAlign.center, color: Color(0xFF2B353E), - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, + letterSpacing: -0.3, ), AppText( ' (' + value.value.toString() + ') ', fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, textAlign: TextAlign.center, color: Color(0xFF2B353E), + letterSpacing: -0.3, fontWeight: FontWeight.bold, ), ], diff --git a/lib/widgets/patients/profile/profile-welcome-widget.dart b/lib/widgets/patients/profile/profile-welcome-widget.dart index 17b88630..cd712a07 100644 --- a/lib/widgets/patients/profile/profile-welcome-widget.dart +++ b/lib/widgets/patients/profile/profile-welcome-widget.dart @@ -25,9 +25,6 @@ class ProfileWelcomeWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ this.isClinic == true ? clinicWidget : SizedBox(), - SizedBox( - width: 20, - ), if(authenticationViewModel.doctorProfile!=null) CircleAvatar( // radius: (52) diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 48661a32..3f07cc80 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -18,6 +18,7 @@ class AppText extends StatefulWidget { final double marginRight; final double marginBottom; final double marginLeft; + final double letterSpacing; final TextAlign textAlign; final bool bold; final bool regular; @@ -56,6 +57,7 @@ class AppText extends StatefulWidget { this.visibility = true, this.textOverflow, this.textDecoration, + this.letterSpacing, }); @override @@ -127,16 +129,15 @@ class _AppTextState extends State { fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight) : TextStyle( - fontStyle: widget.italic ? FontStyle.italic : null, - color: - widget.color != null ? widget.color : Colors.black, - fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: - widget.variant == "overline" ? 1.5 : null, - fontWeight: widget.fontWeight ?? _getFontWeight(), - fontFamily: widget.fontFamily ?? 'Poppins', - decoration: widget.textDecoration, - height: widget.fontHeight), + fontStyle: widget.italic ? FontStyle.italic : null, + color: + widget.color != null ? widget.color : Colors.black, + fontSize: widget.fontSize ?? _getFontSize(), + letterSpacing: widget.letterSpacing, + fontWeight: widget.fontWeight ?? _getFontWeight(), + fontFamily: widget.fontFamily ?? 'Poppins', + decoration: widget.textDecoration, + height: widget.fontHeight), ), if (widget.readMore && text.length > widget.maxLength && hidden) Positioned(