add basic testing for channel_preview widget

This commit is contained in:
Salvatore Giordano
2020-09-21 12:47:48 +02:00
parent d36ecffe1f
commit d3811b72ce
4 changed files with 57 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ class ChannelImage extends StatelessWidget {
String image;
if (snapshot.data?.containsKey('image') == true) {
image = snapshot.data['image'];
} else if (channel.state.members.length == 2) {
} else if (channel.state.members?.length == 2) {
final otherMember = channel.state.members
.firstWhere((member) => member.user.id != client.user.id);
image = otherMember.user.extraData['image'];