Skip to content

Commit

Permalink
Merge branch 'master' of github.com:KRTirtho/spotube
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Sep 3, 2022
2 parents e206f16 + 3b24018 commit 663b08f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
Binary file added assets/user-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 32 additions & 20 deletions lib/components/Home/Sidebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,26 +148,38 @@ class Sidebar extends HookConsumerWidget {
child: CircularProgressIndicator(),
)
else if (data != null)
Row(
children: [
CircleAvatar(
backgroundImage:
CachedNetworkImageProvider(avatarImg),
onBackgroundImageError:
(exception, stackTrace) => Container(
height: 16,
width: 16,
color: Theme.of(context).cardColor,
Flexible(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
CircleAvatar(
backgroundImage:
CachedNetworkImageProvider("asdasd"),
onBackgroundImageError:
(exception, stackTrace) =>
Image.asset(
"assets/user-placeholder.png",
height: 16,
width: 16,
),
),
),
const SizedBox(width: 10),
Text(
data.displayName ?? "Guest",
style: const TextStyle(
fontWeight: FontWeight.bold,
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),
Expand All @@ -183,10 +195,10 @@ class Sidebar extends HookConsumerWidget {
backgroundImage:
CachedNetworkImageProvider(avatarImg),
onBackgroundImageError: (exception, stackTrace) =>
Container(
Image.asset(
"assets/user-placeholder.png",
height: 16,
width: 16,
color: Theme.of(context).cardColor,
),
),
),
Expand Down

0 comments on commit 663b08f

Please sign in to comment.