Skip to content

Commit 663b08f

Browse files
committed
Merge branch 'master' of github.com:KRTirtho/spotube
2 parents e206f16 + 3b24018 commit 663b08f

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

assets/user-placeholder.png

47.3 KB
Loading

lib/components/Home/Sidebar.dart

+32-20
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,38 @@ 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-
onBackgroundImageError:
157-
(exception, stackTrace) => Container(
158-
height: 16,
159-
width: 16,
160-
color: Theme.of(context).cardColor,
151+
Flexible(
152+
child: Row(
153+
mainAxisAlignment:
154+
MainAxisAlignment.spaceEvenly,
155+
children: [
156+
CircleAvatar(
157+
backgroundImage:
158+
CachedNetworkImageProvider("asdasd"),
159+
onBackgroundImageError:
160+
(exception, stackTrace) =>
161+
Image.asset(
162+
"assets/user-placeholder.png",
163+
height: 16,
164+
width: 16,
165+
),
161166
),
162-
),
163-
const SizedBox(width: 10),
164-
Text(
165-
data.displayName ?? "Guest",
166-
style: const TextStyle(
167-
fontWeight: FontWeight.bold,
167+
const SizedBox(
168+
width: 10,
168169
),
169-
),
170-
],
170+
Flexible(
171+
child: Text(
172+
data.displayName ?? "Guest",
173+
maxLines: 1,
174+
softWrap: false,
175+
overflow: TextOverflow.fade,
176+
style: const TextStyle(
177+
fontWeight: FontWeight.bold,
178+
),
179+
),
180+
),
181+
],
182+
),
171183
),
172184
IconButton(
173185
icon: const Icon(Icons.settings_outlined),
@@ -183,10 +195,10 @@ class Sidebar extends HookConsumerWidget {
183195
backgroundImage:
184196
CachedNetworkImageProvider(avatarImg),
185197
onBackgroundImageError: (exception, stackTrace) =>
186-
Container(
198+
Image.asset(
199+
"assets/user-placeholder.png",
187200
height: 16,
188201
width: 16,
189-
color: Theme.of(context).cardColor,
190202
),
191203
),
192204
),

0 commit comments

Comments
 (0)