Skip to content

Commit 3b24018

Browse files
authored
Merge pull request #190 from Demizo/fix_username_overflow
[FIX] Fade Long Usernames on Sidebar
2 parents c3bf511 + 0ae0e19 commit 3b24018

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

lib/components/Home/Sidebar.dart

+24-13
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,31 @@ class Sidebar extends HookConsumerWidget {
148148
child: CircularProgressIndicator(),
149149
)
150150
else if (data != null)
151-
Row(
152-
children: [
153-
CircleAvatar(
154-
backgroundImage:
155-
CachedNetworkImageProvider(avatarImg),
156-
),
157-
const SizedBox(width: 10),
158-
Text(
159-
data.displayName ?? "Guest",
160-
style: const TextStyle(
161-
fontWeight: FontWeight.bold,
151+
Flexible(
152+
child: Row(
153+
mainAxisAlignment:
154+
MainAxisAlignment.spaceEvenly,
155+
children: [
156+
CircleAvatar(
157+
backgroundImage:
158+
CachedNetworkImageProvider(avatarImg),
162159
),
163-
),
164-
],
160+
const SizedBox(
161+
width: 10,
162+
),
163+
Flexible(
164+
child: Text(
165+
data.displayName ?? "Guest",
166+
maxLines: 1,
167+
softWrap: false,
168+
overflow: TextOverflow.fade,
169+
style: const TextStyle(
170+
fontWeight: FontWeight.bold,
171+
),
172+
),
173+
),
174+
],
175+
),
165176
),
166177
IconButton(
167178
icon: const Icon(Icons.settings_outlined),

0 commit comments

Comments
 (0)