replace every `Container()` with `SizedBox.shrink()`

This commit is contained in:
krawieck 2020-09-29 21:45:18 +02:00
parent e234a6a527
commit e1ba4e4dd4
8 changed files with 12 additions and 12 deletions

View File

@ -124,8 +124,8 @@ class MyHomePage extends HookWidget {
children: [
tabButton(Icons.home),
tabButton(Icons.list),
Container(),
Container(),
SizedBox.shrink(),
SizedBox.shrink(),
tabButton(Icons.search),
tabButton(Icons.person),
],

View File

@ -120,7 +120,7 @@ class AddAccountPage extends HookWidget {
url: icon.value,
child: CachedNetworkImage(
imageUrl: icon.value,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
),
),

View File

@ -80,7 +80,7 @@ class AddInstancePage extends HookWidget {
child: FullscreenableImage(
child: CachedNetworkImage(
imageUrl: icon.value,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
url: icon.value,
))

View File

@ -302,7 +302,7 @@ class _CommunityOverview extends StatelessWidget {
url: community.banner,
child: CachedNetworkImage(
imageUrl: community.banner,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
),
SafeArea(

View File

@ -168,7 +168,7 @@ class InstancePage extends HookWidget {
url: site.site.banner,
child: CachedNetworkImage(
imageUrl: site.site.banner,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
),
SafeArea(

View File

@ -251,7 +251,7 @@ class Comment extends HookWidget {
}();
final actions = collapsed.value
? Container()
? SizedBox.shrink()
: Row(children: [
if (selectable.value && !comment.deleted && !comment.removed)
_CommentAction(
@ -324,7 +324,7 @@ class Comment extends HookWidget {
),
),
),
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
),
),

View File

@ -29,7 +29,7 @@ class InfiniteScroll<T> extends HookWidget {
InfiniteScroll({
this.batchSize = 10,
this.prepend = const SizedBox(height: 0, width: 0),
this.prepend = const SizedBox.shrink(),
this.padding,
this.loadingWidget =
const ListTile(title: Center(child: CircularProgressIndicator())),
@ -71,7 +71,7 @@ class InfiniteScroll<T> extends HookWidget {
if (i == data.value.length) {
// if there are no more, skip
if (!hasMore.current) {
return Container();
return SizedBox.shrink();
}
// if it's already fetching more, skip

View File

@ -96,7 +96,7 @@ class UserProfile extends HookWidget {
if (userViewSnap.data?.banner != null)
CachedNetworkImage(
imageUrl: userViewSnap.data.banner,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
)
else
Container(
@ -155,7 +155,7 @@ class UserProfile extends HookWidget {
borderRadius: BorderRadius.all(Radius.circular(12)),
child: CachedNetworkImage(
imageUrl: userViewSnap.data.avatar,
errorWidget: (_, __, ___) => Container(),
errorWidget: (_, __, ___) => SizedBox.shrink(),
),
),
),