use SizedBox

This commit is contained in:
Salvatore Giordano
2020-02-25 13:10:40 +01:00
parent 4e073d47fd
commit 2269a3d684
4 changed files with 4 additions and 13 deletions
+1 -4
View File
@@ -43,10 +43,7 @@ class ChannelListPage extends StatelessWidget {
radius: 10, radius: 10,
child: Text(channelClient.state.unreadCount.toString()), child: Text(channelClient.state.unreadCount.toString()),
) )
: SizedBox( : SizedBox(),
height: 0,
width: 0,
),
); );
}, },
sort: [SortOption('last_message_at')], sort: [SortOption('last_message_at')],
+1 -3
View File
@@ -79,9 +79,7 @@ class ChannelPreview extends StatelessWidget {
final lastMessage = final lastMessage =
channelState.messages.isNotEmpty ? channelState.messages.last : null; channelState.messages.isNotEmpty ? channelState.messages.last : null;
if (lastMessage == null) { if (lastMessage == null) {
return SizedBox.fromSize( return SizedBox();
size: Size.zero,
);
} }
final prefix = lastMessage.attachments final prefix = lastMessage.attachments
+1 -3
View File
@@ -91,9 +91,7 @@ class _MessageListViewState extends State<MessageListView> {
); );
} }
} else { } else {
return SizedBox.fromSize( return SizedBox();
size: Size.zero,
);
} }
} }
+1 -3
View File
@@ -202,9 +202,7 @@ class _MessageWidgetState extends State<MessageWidget>
), ),
), ),
) )
: SizedBox.fromSize( : SizedBox(),
size: Size.zero,
),
], ],
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(