Line data Source code
1 : import 'package:flutter/material.dart';
2 :
3 : enum MsgRecipientStatus {
4 : read,
5 : delivered,
6 : offline,
7 : unRead,
8 : loading,
9 : none,
10 : }
11 :
12 : class ChatBubbleTcController {
13 1 : IconData getMsgRecipientIconData(MsgRecipientStatus msgRecipientStatus) {
14 : switch (msgRecipientStatus) {
15 1 : case MsgRecipientStatus.loading:
16 : return Icons.schedule;
17 1 : case MsgRecipientStatus.offline:
18 : return Icons.done;
19 : default:
20 : return Icons.done_all;
21 : }
22 : }
23 :
24 1 : Color getMsgRecipientIconColor(MsgRecipientStatus msgRecipientStatus) {
25 : switch (msgRecipientStatus) {
26 1 : case MsgRecipientStatus.read:
27 : return Colors.blue;
28 : default:
29 : return const Color(0xFFADB5B8);
30 : }
31 : }
32 : }
|