Merge branch 'master' of github.com:KRTirtho/spotube

This commit is contained in:
Kingkor Roy Tirtho 2022-09-03 09:50:05 +06:00
commit 663b08f428
2 changed files with 32 additions and 20 deletions

BIN
assets/user-placeholder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -148,27 +148,39 @@ 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("asdasd"),
onBackgroundImageError: onBackgroundImageError:
(exception, stackTrace) => Container( (exception, stackTrace) =>
Image.asset(
"assets/user-placeholder.png",
height: 16, height: 16,
width: 16, width: 16,
color: Theme.of(context).cardColor,
), ),
), ),
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)),
@ -183,10 +195,10 @@ class Sidebar extends HookConsumerWidget {
backgroundImage: backgroundImage:
CachedNetworkImageProvider(avatarImg), CachedNetworkImageProvider(avatarImg),
onBackgroundImageError: (exception, stackTrace) => onBackgroundImageError: (exception, stackTrace) =>
Container( Image.asset(
"assets/user-placeholder.png",
height: 16, height: 16,
width: 16, width: 16,
color: Theme.of(context).cardColor,
), ),
), ),
), ),