add textoverflow param to channel name

This commit is contained in:
Salvatore Giordano
2021-05-10 17:07:45 +02:00
parent b3ec54ae48
commit 45213fa7f1
@@ -12,11 +12,15 @@ class ChannelName extends StatelessWidget {
const ChannelName({ const ChannelName({
Key? key, Key? key,
this.textStyle, this.textStyle,
this.textOverflow = TextOverflow.ellipsis,
}) : super(key: key); }) : super(key: key);
/// The style of the text displayed /// The style of the text displayed
final TextStyle? textStyle; final TextStyle? textStyle;
/// How visual overflow should be handled.
final TextOverflow textOverflow;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final client = StreamChat.of(context); final client = StreamChat.of(context);
@@ -71,7 +75,7 @@ class ChannelName extends StatelessWidget {
return Text( return Text(
title!, title!,
style: textStyle, style: textStyle,
overflow: TextOverflow.ellipsis, overflow: textOverflow,
); );
}, },
); );