add textoverflow param to channel name
This commit is contained in:
@@ -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,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user