CometChatListItem constructor

const CometChatListItem({
  1. Key? key,
  2. Widget? chatAvatar({
    1. String? name,
    2. required bool online,
    3. Color? rimColor,
    4. double? size,
    5. required String url,
    })?,
  3. Widget? chatConversationItem({
    1. required String avatarName,
    2. String? avatarUrl,
    3. bool? isGroupChat,
    4. String? lastAction,
    5. bool? online,
    6. String? subtitle,
    7. DateTime? time,
    8. required String title,
    9. int? unreadCount,
    })?,
  4. int? unreadMessageCount,
  5. BaseMessage? lastMessage,
  6. String lastMessageText = '',
  7. String? avatarURL,
  8. String? avatarName,
  9. Color? statusIndicatorColor,
  10. Widget? statusIndicatorIcon,
  11. String? title,
  12. Widget? subtitleView,
  13. List<CometChatOption>? options,
  14. Widget? tailView,
  15. bool isGroupChat = false,
  16. bool? hideSeparator = true,
  17. AvatarStyle avatarStyle = const AvatarStyle(),
  18. bool? status,
  19. StatusIndicatorStyle statusIndicatorStyle = const StatusIndicatorStyle(),
  20. ListItemStyle style = const ListItemStyle(),
  21. CometChatTheme? theme,
  22. String? id,
})

Implementation

const CometChatListItem({
  super.key,
  this.chatAvatar,
  this.chatConversationItem,
  this.unreadMessageCount,
  this.lastMessage,
  this.lastMessageText = '',
  this.avatarURL,
  this.avatarName,
  this.statusIndicatorColor,
  this.statusIndicatorIcon,
  this.title,
  this.subtitleView,
  this.options,
  this.tailView,
  this.isGroupChat = false,
  this.hideSeparator = true,
  this.avatarStyle = const AvatarStyle(),
  this.status,
  this.statusIndicatorStyle = const StatusIndicatorStyle(),
  this.style = const ListItemStyle(),
  this.theme,
  this.id,
}) : assert(avatarURL != null || avatarName != null);