CometChatMessageHeader constructor

const CometChatMessageHeader({
  1. Key? key,
  2. WidgetBuilder? backButton,
  3. MessageHeaderStyle messageHeaderStyle = const MessageHeaderStyle(),
  4. Group? group,
  5. User? user,
  6. List<Widget>? appBarOptions(
    1. User? user,
    2. Group? group,
    3. BuildContext context
    )?,
  7. Widget listItemView(
    1. Group? group,
    2. User? user,
    3. BuildContext context
    )?,
  8. bool? hideBackButton = true,
  9. bool? disableUserPresence,
  10. Widget? privateGroupIcon,
  11. Widget? protectedGroupIcon,
  12. Widget? subtitleView(
    1. Group? group,
    2. User? user,
    3. BuildContext context
    )?,
  13. Widget? chatMessagesHeader({
    1. String? avatarUrl,
    2. String? groupRef,
    3. bool? isGroup,
    4. bool? isTyping,
    5. bool? online,
    6. String? subtitle,
    7. required String title,
    8. bool? userIsNotBlocked,
    })?,
  14. CometChatTheme? theme,
  15. AvatarStyle? avatarStyle,
  16. StatusIndicatorStyle? statusIndicatorStyle,
  17. ListItemStyle? listItemStyle,
  18. Widget? chatAvatar({
    1. String? name,
    2. required bool online,
    3. Color? rimColor,
    4. double? size,
    5. required String url,
    })?,
  19. bool disableTyping = false,
  20. VoidCallback? onBack,
})

Implementation

const CometChatMessageHeader(
    {super.key,
    this.backButton,
    this.messageHeaderStyle = const MessageHeaderStyle(),
    this.group,
    this.user,
    this.appBarOptions,
    this.listItemView,
    this.hideBackButton = true,
    this.disableUserPresence,
    this.privateGroupIcon,
    this.protectedGroupIcon,
    this.subtitleView,
    this.chatMessagesHeader,
    this.theme,
    this.avatarStyle,
    this.statusIndicatorStyle,
    this.listItemStyle,
    this.chatAvatar,
    this.disableTyping = false,
    this.onBack})
    : assert(user != null || group != null,
          "One of user or group should be passed"),
      assert(user == null || group == null,
          "Only one of user or group should be passed");