🎨 Use SizedBox.shrink instead of empty SizedBox for placeholder
This commit is contained in:
@ -11,7 +11,7 @@ class ChatCallCurrentIndicator extends StatelessWidget {
|
||||
|
||||
return Obx(() {
|
||||
if (call.current.value == null || call.channel.value == null) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return ListTile(
|
||||
|
@ -40,7 +40,7 @@ class ChatEvent extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildLinkExpansion() {
|
||||
if (item.body['text'] == null) return const SizedBox();
|
||||
if (item.body['text'] == null) return const SizedBox.shrink();
|
||||
return LinkExpansion(content: item.body['text']);
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ class ChatEvent extends StatelessWidget {
|
||||
? List<String>.from(item.body['attachments']?.whereType<String>())
|
||||
: List<String>.empty();
|
||||
|
||||
if (attachments.isEmpty) return const SizedBox();
|
||||
if (attachments.isEmpty) return const SizedBox.shrink();
|
||||
|
||||
if (isMinimal) {
|
||||
final unFocusColor =
|
||||
@ -94,7 +94,7 @@ class ChatEvent extends StatelessWidget {
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData || snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return Container(
|
||||
|
@ -96,7 +96,7 @@ class ChatEventList extends StatelessWidget {
|
||||
chatController.totalEvents - chatController.currentEvents.length;
|
||||
|
||||
if (amount.value <= 0 || chatController.isLoading.isTrue) {
|
||||
return const SliverToBoxAdapter(child: SizedBox());
|
||||
return const SliverToBoxAdapter(child: SizedBox.shrink());
|
||||
}
|
||||
|
||||
return SliverToBoxAdapter(
|
||||
|
Reference in New Issue
Block a user