From 0ae0e196fdd6e8ae3e47f61be18673ea3c20383c Mon Sep 17 00:00:00 2001 From: Demizo <73141750+Demizo@users.noreply.github.com> Date: Thu, 1 Sep 2022 23:37:14 -0500 Subject: [PATCH] Username and Icon now flexible Nested username and icon within a flexible box --- lib/components/Home/Sidebar.dart | 43 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index 95e90e21..04201043 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -148,28 +148,31 @@ class Sidebar extends HookConsumerWidget { child: CircularProgressIndicator(), ) else if (data != null) - Row( - children: [ - CircleAvatar( - backgroundImage: - CachedNetworkImageProvider(avatarImg), - ), - const SizedBox( - width: 10, - ), - SizedBox( - width: 120, - child: Text( - data.displayName ?? "Guest", - maxLines: 1, - softWrap: false, - overflow: TextOverflow.fade, - style: const TextStyle( - fontWeight: FontWeight.bold, + Flexible( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + CircleAvatar( + backgroundImage: + CachedNetworkImageProvider(avatarImg), + ), + const SizedBox( + width: 10, + ), + Flexible( + child: Text( + data.displayName ?? "Guest", + maxLines: 1, + softWrap: false, + overflow: TextOverflow.fade, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), ), ), - ), - ], + ], + ), ), IconButton( icon: const Icon(Icons.settings_outlined),