add messagelist typing indicator

This commit is contained in:
Salvatore Giordano
2020-11-25 12:43:42 +01:00
parent 24c5e39bda
commit 71123fbafb
5 changed files with 67 additions and 26 deletions
+8
View File
@@ -8,10 +8,14 @@ class ChannelInfo extends StatelessWidget {
/// The style of the text displayed
final TextStyle textStyle;
/// If true the typing indicator will be rendered if a user is typing
final bool showTypingIndicator;
const ChannelInfo({
Key key,
@required this.channel,
this.textStyle,
this.showTypingIndicator = true,
}) : super(key: key);
@override
@@ -75,6 +79,10 @@ class ChannelInfo extends StatelessWidget {
}
}
if (!showTypingIndicator) {
return alternativeWidget;
}
return TypingIndicator(
alignment: Alignment.center,
alternativeWidget: alternativeWidget,