replace every `Container()` with `SizedBox.shrink()`
This commit is contained in:
parent
e234a6a527
commit
e1ba4e4dd4
|
@ -124,8 +124,8 @@ class MyHomePage extends HookWidget {
|
||||||
children: [
|
children: [
|
||||||
tabButton(Icons.home),
|
tabButton(Icons.home),
|
||||||
tabButton(Icons.list),
|
tabButton(Icons.list),
|
||||||
Container(),
|
SizedBox.shrink(),
|
||||||
Container(),
|
SizedBox.shrink(),
|
||||||
tabButton(Icons.search),
|
tabButton(Icons.search),
|
||||||
tabButton(Icons.person),
|
tabButton(Icons.person),
|
||||||
],
|
],
|
||||||
|
|
|
@ -120,7 +120,7 @@ class AddAccountPage extends HookWidget {
|
||||||
url: icon.value,
|
url: icon.value,
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: icon.value,
|
imageUrl: icon.value,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -80,7 +80,7 @@ class AddInstancePage extends HookWidget {
|
||||||
child: FullscreenableImage(
|
child: FullscreenableImage(
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: icon.value,
|
imageUrl: icon.value,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
url: icon.value,
|
url: icon.value,
|
||||||
))
|
))
|
||||||
|
|
|
@ -302,7 +302,7 @@ class _CommunityOverview extends StatelessWidget {
|
||||||
url: community.banner,
|
url: community.banner,
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: community.banner,
|
imageUrl: community.banner,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SafeArea(
|
SafeArea(
|
||||||
|
|
|
@ -168,7 +168,7 @@ class InstancePage extends HookWidget {
|
||||||
url: site.site.banner,
|
url: site.site.banner,
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: site.site.banner,
|
imageUrl: site.site.banner,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SafeArea(
|
SafeArea(
|
||||||
|
|
|
@ -251,7 +251,7 @@ class Comment extends HookWidget {
|
||||||
}();
|
}();
|
||||||
|
|
||||||
final actions = collapsed.value
|
final actions = collapsed.value
|
||||||
? Container()
|
? SizedBox.shrink()
|
||||||
: Row(children: [
|
: Row(children: [
|
||||||
if (selectable.value && !comment.deleted && !comment.removed)
|
if (selectable.value && !comment.deleted && !comment.removed)
|
||||||
_CommentAction(
|
_CommentAction(
|
||||||
|
@ -324,7 +324,7 @@ class Comment extends HookWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -29,7 +29,7 @@ class InfiniteScroll<T> extends HookWidget {
|
||||||
|
|
||||||
InfiniteScroll({
|
InfiniteScroll({
|
||||||
this.batchSize = 10,
|
this.batchSize = 10,
|
||||||
this.prepend = const SizedBox(height: 0, width: 0),
|
this.prepend = const SizedBox.shrink(),
|
||||||
this.padding,
|
this.padding,
|
||||||
this.loadingWidget =
|
this.loadingWidget =
|
||||||
const ListTile(title: Center(child: CircularProgressIndicator())),
|
const ListTile(title: Center(child: CircularProgressIndicator())),
|
||||||
|
@ -71,7 +71,7 @@ class InfiniteScroll<T> extends HookWidget {
|
||||||
if (i == data.value.length) {
|
if (i == data.value.length) {
|
||||||
// if there are no more, skip
|
// if there are no more, skip
|
||||||
if (!hasMore.current) {
|
if (!hasMore.current) {
|
||||||
return Container();
|
return SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it's already fetching more, skip
|
// if it's already fetching more, skip
|
||||||
|
|
|
@ -96,7 +96,7 @@ class UserProfile extends HookWidget {
|
||||||
if (userViewSnap.data?.banner != null)
|
if (userViewSnap.data?.banner != null)
|
||||||
CachedNetworkImage(
|
CachedNetworkImage(
|
||||||
imageUrl: userViewSnap.data.banner,
|
imageUrl: userViewSnap.data.banner,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
Container(
|
Container(
|
||||||
|
@ -155,7 +155,7 @@ class UserProfile extends HookWidget {
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: userViewSnap.data.avatar,
|
imageUrl: userViewSnap.data.avatar,
|
||||||
errorWidget: (_, __, ___) => Container(),
|
errorWidget: (_, __, ___) => SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue