From ea68c6005c90ac6da8c34e3317f5d31b8956d054 Mon Sep 17 00:00:00 2001 From: sidhdhi canopas Date: Tue, 9 Jul 2024 17:00:15 +0530 Subject: [PATCH] fiX squad ui when single in a row and subtitle text align --- .../components/match_detail_squad_view.dart | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/khelo/lib/ui/flow/matches/match_detail/components/match_detail_squad_view.dart b/khelo/lib/ui/flow/matches/match_detail/components/match_detail_squad_view.dart index 9be0c448..230a99b8 100644 --- a/khelo/lib/ui/flow/matches/match_detail/components/match_detail_squad_view.dart +++ b/khelo/lib/ui/flow/matches/match_detail/components/match_detail_squad_view.dart @@ -184,8 +184,10 @@ class MatchDetailSquadView extends ConsumerWidget { String? captainId, }) { if (user == null) { - return const SizedBox( - height: 0, + return const Expanded( + child: SizedBox( + height: 0, + ), ); } bool isCaptain = user.id == captainId; @@ -222,11 +224,13 @@ class MatchDetailSquadView extends ConsumerWidget { textAlign: isSecondTeam ? TextAlign.end : null, ), Text( - user.player_role != null - ? user.player_role!.getString(context) - : context.l10n.common_not_specified_title, - style: AppTextStyle.caption - .copyWith(color: context.colorScheme.textDisabled)), + user.player_role != null + ? user.player_role!.getString(context) + : context.l10n.common_not_specified_title, + style: AppTextStyle.caption + .copyWith(color: context.colorScheme.textDisabled), + textAlign: isSecondTeam ? TextAlign.end : null, + ), ], ), ),