mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Add support for conversation image
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:comunic/helpers/conversations_helper.dart';
|
||||
import 'package:comunic/lists/users_list.dart';
|
||||
import 'package:comunic/models/conversation.dart';
|
||||
@ -66,13 +67,21 @@ class ConversationTile extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
// Tile color
|
||||
tileColor: conversation.sawLastMessage
|
||||
? null
|
||||
: (conversation.color ?? Colors.blue).withOpacity(0.2),
|
||||
|
||||
// Leading icon
|
||||
leading: Icon(
|
||||
conversation.sawLastMessage ? Icons.check_circle : Icons.lens,
|
||||
color: conversation.sawLastMessage
|
||||
? (darkTheme() ? darkAccentColor : null)
|
||||
: conversation.color ?? Colors.blue,
|
||||
),
|
||||
leading: conversation.logoURL == null
|
||||
? Icon(
|
||||
conversation.sawLastMessage ? Icons.check_circle : Icons.lens,
|
||||
color: (darkTheme() ? darkAccentColor : null),
|
||||
)
|
||||
: CachedNetworkImage(
|
||||
imageUrl: conversation.logoURL,
|
||||
width: 30,
|
||||
),
|
||||
|
||||
// Conversation information
|
||||
isThreeLine: true,
|
||||
|
Reference in New Issue
Block a user