[Message Widget] Modify read indicator as per new design v2

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2020-12-31 14:18:12 +05:30
parent 168630fcad
commit ef0bad1192
3 changed files with 43 additions and 24 deletions
+9 -7
View File
@@ -4,27 +4,29 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
/// Used to show the sending status of the message
class SendingIndicator extends StatelessWidget {
final Message message;
final bool allRead;
final bool isMessageRead;
final double size;
const SendingIndicator({
Key key,
this.message,
this.allRead = false,
this.isMessageRead = false,
this.size = 12,
}) : super(key: key);
@override
Widget build(BuildContext context) {
if (allRead) {
if (isMessageRead) {
return Icon(
Icons.done_all,
size: 8,
Icons.done_all_rounded,
size: size,
color: StreamChatTheme.of(context).accentColor,
);
}
if (message.status == MessageSendingStatus.SENT || message.status == null) {
return Icon(
Icons.done,
size: 8,
size: size,
color: IconTheme.of(context).color.withOpacity(0.5),
);
}
@@ -32,7 +34,7 @@ class SendingIndicator extends StatelessWidget {
message.status == MessageSendingStatus.UPDATING) {
return Icon(
Icons.access_time,
size: 8,
size: size,
);
}
return SizedBox();