update customize_channel_preview example

This commit is contained in:
Salvatore Giordano
2020-02-25 13:07:23 +01:00
parent 65d9d7889d
commit 4e073d47fd
6 changed files with 47 additions and 15 deletions
+19
View File
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:stream_chat/stream_chat.dart';
class ChannelName extends StatelessWidget {
const ChannelName({
Key key,
@required this.channel,
}) : super(key: key);
final Channel channel;
@override
Widget build(BuildContext context) {
return Text(
channel.extraData['name'] as String ?? channel.cid,
style: Theme.of(context).textTheme.body2,
);
}
}