Skip to content

Commit

Permalink
multi-user fix
Browse files Browse the repository at this point in the history
  • Loading branch information
festelo committed Jun 12, 2020
1 parent 71a7f15 commit 65193ab
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
23 changes: 13 additions & 10 deletions lib/pages/home/accounts_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ class UserAccountModal extends StatelessWidget {
width: 40,
decoration: BoxDecoration(
image: user.imageInfo?.small != null
? DecorationImage(
image: NetworkImage(
user.imageInfo?.small,
),
colorFilter: colorFilter,
fit: BoxFit.cover,
)
: null,
? DecorationImage(
image: NetworkImage(
user.imageInfo?.small,
),
colorFilter: colorFilter,
fit: BoxFit.cover,
)
: null,
shape: BoxShape.circle,
border: border,
),
Expand Down Expand Up @@ -231,8 +231,11 @@ class _AccountsModalState extends EpicState<AccountsModal> {
Widget build(BuildContext context) {
Widget content;
if (loading) {
content = Center(
child: CircularProgressIndicator(),
content = Container(
height: 50,
child: Center(
child: CircularProgressIndicator(),
),
);
} else if (users.isEmpty) {
content = Padding(
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/home/artists/artists_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
import 'routes.dart';

class ArtistsTab extends StatelessWidget {
const ArtistsTab([Key key]): super(key: key);

@override
Widget build(BuildContext context) {
return Navigator(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class _HomePageState extends EpicState<HomePage> {
)
: Column(
children: [
Expanded(child: ArtistsTab()),
Expanded(child: ArtistsTab(ValueKey(user.id))),
// Not in bottomNavigationBar property to let bottom sheet
// be over the bottom nav bar
BottomNavigationBar(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lastfm_dashboard
description: Last.fm Dashboard

version: 0.1.0+1
version: 0.1.1+1

environment:
sdk: ">=2.8.0-dev.12 <3.0.0"
Expand Down

0 comments on commit 65193ab

Please sign in to comment.