🎨 Use SizedBox.shrink instead of empty SizedBox for placeholder
This commit is contained in:
@@ -36,7 +36,7 @@ class AboutScreen extends StatelessWidget {
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return Text(
|
||||
|
@@ -84,7 +84,7 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
||||
participant: call.focusTrack.value!,
|
||||
onTap: () {},
|
||||
)
|
||||
: const SizedBox(),
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
|
@@ -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();
|
||||
}),
|
||||
],
|
||||
);
|
||||
|
@@ -112,7 +112,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
children: [
|
||||
Obx(() {
|
||||
if (_channels.isLoading.isFalse) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
} else {
|
||||
return const LinearProgressIndicator();
|
||||
}
|
||||
|
@@ -190,7 +190,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
icon: const Icon(Icons.local_fire_department),
|
||||
onPressed: _signingDaily ? null : _signDaily,
|
||||
)
|
||||
: const SizedBox(),
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
).paddingSymmetric(horizontal: 8),
|
||||
|
@@ -155,7 +155,7 @@ class PostCreatePopup extends StatelessWidget {
|
||||
final AuthProvider auth = Get.find();
|
||||
|
||||
if (auth.isAuthorized.isFalse) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
final List<dynamic> actionList = [
|
||||
|
Reference in New Issue
Block a user