Skip to content

Commit

Permalink
Merge pull request #565 from Maxr1998/shrink-boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmshrv authored Dec 20, 2023
2 parents d1f9988 + c5a6f73 commit d889d50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
10 changes: 5 additions & 5 deletions lib/components/AlbumScreen/downloaded_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _DownloadedIndicatorState extends State<DownloadedIndicator> {
// _currentStatus = snapshot.data?.status;
// }
if (_currentStatus == null) {
return const SizedBox(width: 0, height: 0);
return const SizedBox.shrink();
} else if (_currentStatus == DownloadTaskStatus.complete) {
return Icon(
Icons.download,
Expand Down Expand Up @@ -117,19 +117,19 @@ class _DownloadedIndicatorState extends State<DownloadedIndicator> {
size: widget.size,
);
} else {
return const SizedBox(width: 0, height: 0);
return const SizedBox.shrink();
}
// },
// );
},
);
} else if (snapshot.hasError) {
errorSnackbar(snapshot.error, context);
return const SizedBox(width: 0, height: 0);
return const SizedBox.shrink();
} else {
return const SizedBox(width: 0, height: 0);
return const SizedBox.shrink();
}
},
);
}
}
}
12 changes: 3 additions & 9 deletions lib/components/MusicScreen/album_item_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,13 @@ class AlbumItemCard extends StatelessWidget {
} else {
// ValueListenableBuilder doesn't let us return null, so we
// return a 0-sized SizedBox.
return const SizedBox(
width: 0,
height: 0,
);
return const SizedBox.shrink();
}
},
)
: FinampSettingsHelper.finampSettings.showTextOnGridView
? _AlbumItemCardText(item: item, parentType: parentType)
: const SizedBox(
width: 0,
height: 0,
),
: const SizedBox.shrink(),
Positioned.fill(
child: Material(
color: Colors.transparent,
Expand Down Expand Up @@ -137,4 +131,4 @@ class _AlbumItemCardText extends StatelessWidget {
),
);
}
}
}
12 changes: 3 additions & 9 deletions lib/components/now_playing_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,13 @@ class NowPlayingBar extends StatelessWidget {
),
);
} else {
return const SizedBox(
width: 0,
height: 0,
);
return const SizedBox.shrink();
}
} else {
return const SizedBox(
width: 0,
height: 0,
);
return const SizedBox.shrink();
}
},
),
);
}
}
}

0 comments on commit d889d50

Please sign in to comment.