update pubspec

This commit is contained in:
Salvatore Giordano
2020-02-26 11:21:26 +01:00
parent ca4bef0ad0
commit aee5067f9c
3 changed files with 8 additions and 34 deletions
-29
View File
@@ -1,29 +0,0 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:stream_chat/stream_chat.dart';
class ChannelAvatar extends StatelessWidget {
const ChannelAvatar({
Key key,
@required this.channel,
this.radius = 20,
}) : super(key: key);
final Channel channel;
final double radius;
@override
Widget build(BuildContext context) {
return CircleAvatar(
radius: radius,
backgroundImage: channel.extraData.containsKey('image')
? CachedNetworkImageProvider(channel.extraData['image'])
: null,
child: channel.extraData.containsKey('image')
? null
: Text(channel.extraData.containsKey('name')
? channel.extraData['name'][0]
: ''),
);
}
}
+7 -3
View File
@@ -6,20 +6,24 @@ class ChannelImage extends StatelessWidget {
const ChannelImage({
Key key,
@required this.channel,
this.radius = 20,
}) : super(key: key);
final Channel channel;
final double radius;
@override
Widget build(BuildContext context) {
return CircleAvatar(
radius: 20,
radius: radius,
backgroundImage: channel.extraData.containsKey('image')
? CachedNetworkImageProvider(channel.extraData['image'] as String)
? CachedNetworkImageProvider(channel.extraData['image'])
: null,
child: channel.extraData.containsKey('image')
? null
: Text(channel.config.name[0]),
: Text(channel.extraData.containsKey('name')
? channel.extraData['name'][0]
: ''),
);
}
}
+1 -2
View File
@@ -19,8 +19,7 @@ dependencies:
video_player: ^0.10.7
chewie: ^0.9.8+1
animations: ^1.0.0+3
stream_chat:
path: ../stream_chat_dart
stream_chat: ^0.1.6
dev_dependencies:
pedantic: ^1.8.0+1