🎨 Use SizedBox.shrink instead of empty SizedBox for placeholder

This commit is contained in:
2024-09-07 17:48:07 +08:00
parent 85f97521e5
commit 4e8f2ddef3
20 changed files with 37 additions and 36 deletions

View File

@ -45,7 +45,7 @@ class _AccountBadgeWidgetState extends State<AccountBadgeWidget> {
Widget build(BuildContext context) {
final spec = badges[widget.item.type];
if (spec == null) return const SizedBox();
if (spec == null) return const SizedBox.shrink();
return Tooltip(
richMessage: TextSpan(

View File

@ -71,7 +71,7 @@ class AccountHeadingWidget extends StatelessWidget {
content: banner,
fit: BoxFit.cover,
)
: const SizedBox(),
: const SizedBox.shrink(),
),
),
).paddingSymmetric(horizontal: 16),