🎨 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

@ -84,7 +84,7 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
participant: call.focusTrack.value!,
onTap: () {},
)
: const SizedBox(),
: const SizedBox.shrink(),
),
Positioned(
left: 0,

View File

@ -222,7 +222,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
actions: [
const BackgroundStateWidget(),
Builder(builder: (context) {
if (_isBusy || _channel == null) return const SizedBox();
if (_isBusy || _channel == null) return const SizedBox.shrink();
return ChatCallButton(
realm: _channel!.realm,
@ -299,7 +299,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
if (_chatController.isLoading.isTrue) {
return const LinearProgressIndicator().animate().slideY();
} else {
return const SizedBox();
return const SizedBox.shrink();
}
}),
ClipRect(
@ -350,7 +350,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
]),
);
}
return const SizedBox();
return const SizedBox.shrink();
}),
],
);