Merge pull request #190 from Demizo/fix_username_overflow

[FIX] Fade Long Usernames on Sidebar
This commit is contained in:
Kingkor Roy Tirtho 2022-09-02 10:51:30 +06:00 committed by GitHub
commit 3b24018bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,21 +148,32 @@ class Sidebar extends HookConsumerWidget {
child: CircularProgressIndicator(), child: CircularProgressIndicator(),
) )
else if (data != null) else if (data != null)
Row( Flexible(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [ children: [
CircleAvatar( CircleAvatar(
backgroundImage: backgroundImage:
CachedNetworkImageProvider(avatarImg), CachedNetworkImageProvider(avatarImg),
), ),
const SizedBox(width: 10), const SizedBox(
Text( width: 10,
),
Flexible(
child: Text(
data.displayName ?? "Guest", data.displayName ?? "Guest",
maxLines: 1,
softWrap: false,
overflow: TextOverflow.fade,
style: const TextStyle( style: const TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
),
], ],
), ),
),
IconButton( IconButton(
icon: const Icon(Icons.settings_outlined), icon: const Icon(Icons.settings_outlined),
onPressed: () => goToSettings(context)), onPressed: () => goToSettings(context)),