From fe179f6dfc93c49ab19f39256d9a3095592aab86 Mon Sep 17 00:00:00 2001 From: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:29:23 +0200 Subject: [PATCH] fix: update Fajr Wake Up screen text alignment to two lines --- .../home/sub_screens/fajr_wake_up_screen.dart | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/src/pages/home/sub_screens/fajr_wake_up_screen.dart b/lib/src/pages/home/sub_screens/fajr_wake_up_screen.dart index 147bd9501..8d0bddb8f 100644 --- a/lib/src/pages/home/sub_screens/fajr_wake_up_screen.dart +++ b/lib/src/pages/home/sub_screens/fajr_wake_up_screen.dart @@ -1,3 +1,4 @@ +import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:mawaqit/i18n/l10n.dart'; @@ -70,22 +71,20 @@ class _FajrWakeUpSubScreenState extends State { color: Colors.white, ).animate().slideX(begin: -2).addRepaintBoundary(), Flexible( - fit: FlexFit.loose, - flex: 1, + flex: 2, child: Padding( padding: const EdgeInsets.all(20.0), - child: FittedBox( - child: Text( - S.of(context).salatKhayrMinaNawm, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14.vw, - // height: 2, - color: Colors.white, - shadows: kHomeTextShadow, - ), - ).animate().slideY(begin: -1, delay: .5.seconds).fadeIn().addRepaintBoundary(), - ), + child: AutoSizeText( + S.of(context).salatKhayrMinaNawm, + maxLines: 2, + textAlign: TextAlign.center, // Added text alignment + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 8.vw, + color: Colors.white, + shadows: kHomeTextShadow, + ), + ).animate().slideY(begin: -1, delay: .5.seconds).fadeIn().addRepaintBoundary(), ), ), Icon(