CometChatDetailsTemplate class

CometChatDetailsTemplate is the section of options displayed in CometChatDetails


CometChatDetailsTemplate(
  id: "user-details",
  options: (user, group, context, theme) {
    return [
      CometChatDetailsOption(
        id: "user-details-name",
        title: "Name",
        customView: Text(user?.name ?? ""),
      ),
      CometChatDetailsOption(
        id: "user-details-username",
        title: "Username",
        customView: Text(user?.name ?? ""),
      ),
    ];
  },
  title: "User Details",
  titleStyle: TextStyle(
    fontSize: 18,
    fontWeight: FontWeight.bold,
  ),
  sectionSeparatorColor: Colors.grey[300],
  hideSectionSeparator: false,
  itemSeparatorColor: Colors.grey[200],
  hideItemSeparator: false,
)

Constructors

CometChatDetailsTemplate({required String id, List<CometChatDetailsOption> options(User? user, Group? group, BuildContext? context, CometChatTheme? theme)?, String? title, TextStyle? titleStyle, Color? sectionSeparatorColor, bool? hideSectionSeparator, Color? itemSeparatorColor, bool? hideItemSeparator})
CometChatDetailsTemplate constructor requires id and options while initializing.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
hideItemSeparator bool?
hideItemSeparator is a boolean which decides whether to hide item separator or not
final
hideSectionSeparator bool?
hideSectionSeparator is a boolean which decides whether to hide section separator or not
final
id String
id is unique identifier for every CometChatDetailsTemplate
final
itemSeparatorColor Color?
itemSeparatorColor is the color of item separator
final
options List<CometChatDetailsOption> Function(User? user, Group? group, BuildContext? context, CometChatTheme? theme)?
options is a function which returns list of CometChatDetailsOption for every CometChatDetailsTemplate
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sectionSeparatorColor Color?
sectionSeparatorColor is the color of section separator
final
title String?
title is the title of CometChatDetailsTemplate
final
titleStyle TextStyle?
titleStyle is the style of title of CometChatDetailsTemplate
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited