copyWith method
MessagesViewArguments
copyWith({
- ChatUIKitProfile? profile,
- MessagesViewController? controller,
- ChatUIKitAppBarModel? appBarModel,
- Widget? inputBar,
- MessageItemShowHandler? showMessageItemAvatar,
- MessageItemShowHandler? showMessageItemNickname,
- MessageItemGlobalPositionTapHandler? onItemTap,
- MessageItemGlobalPositionTapHandler? onDoubleTap,
- MessageItemTapHandler? onAvatarTap,
- MessageItemTapHandler? onAvatarLongPress,
- MessageItemTapHandler? onNicknameTap,
- List<
ChatUIKitEventAction> ? morePressActions, - MessageItemBuilder? itemBuilder,
- MessageItemBuilder? alertItemBuilder,
- FocusNode? focusNode,
- Widget? emojiWidget,
- Widget? replyBarBuilder(
- BuildContext context,
- MessageModel replyMessage
- Widget quoteBuilder(
- BuildContext context,
- QuoteModel model
- bool onErrorBtnTapHandler(
- BuildContext context,
- MessageModel message
- MessageItemBubbleBuilder? bubbleBuilder,
- MessageItemBuilder? bubbleContentBuilder,
- MessagesViewMorePressHandler? onMoreActionsItemsHandler,
- MessagesViewItemLongPressPositionHandler? onItemLongPressHandler,
- ChatUIKitKeyboardPanelController? inputController,
- bool? enableAppBar,
- bool? forceLeft,
- Widget? multiSelectBottomBar,
- ChatUIKitViewObserver? viewObserver,
- String? attributes,
- MessageReactionItemTapHandler? onReactionItemTap,
- MessageItemTapHandler? onReactionInfoTap,
- MessageItemBuilder? reactionItemsBuilder,
- MessageItemTapHandler? onThreadItemTap,
- MessageItemBuilder? threadItemBuilder,
- Widget? backgroundWidget,
Implementation
MessagesViewArguments copyWith({
/// 用户信息对象,用于设置对方信息。详细参考 [ChatUIKitProfile]。
ChatUIKitProfile? profile,
/// 消息列表控制器,用于控制消息列表和收发消息等,如果不设置将会自动创建。详细参考 [MessagesViewController]。
MessagesViewController? controller,
ChatUIKitAppBarModel? appBarModel,
/// 自定义输入框, 如果设置后将会替换默认的输入框。详细参考 [ChatUIKitInputBar]。
Widget? inputBar,
/// 是否显示头像, 默认为 `true`。 如果设置为 `false` 将不会显示头像。 默认为 `true`。
MessageItemShowHandler? showMessageItemAvatar,
/// 是否显示昵称, 默认为 `true`。如果设置为 `false` 将不会显示昵称。 默认为 `true`。
MessageItemShowHandler? showMessageItemNickname,
/// 消息点击事件, 如果设置后消息点击事件将直接回调,如果不处理可以返回 `false`。
MessageItemGlobalPositionTapHandler? onItemTap,
/// 消息双击事件,如果设置后消息双击事件将直接回调,如果不处理可以返回 `false`。
MessageItemGlobalPositionTapHandler? onDoubleTap,
/// 头像点击事件,如果设置后头像点击事件将直接回调,如果不处理可以返回 `false`。
MessageItemTapHandler? onAvatarTap,
/// 头像长按事件,如果设置后头像长按事件将直接回调,如果不处理可以返回 `false`。
MessageItemTapHandler? onAvatarLongPress,
/// 昵称点击事件, 如果设置后昵称点击事件将直接回调,如果不处理可以返回 `false`。
MessageItemTapHandler? onNicknameTap,
/// 更多按钮点击事件列表,如果设置后将会替换默认的更多按钮点击事件列表。详细参考 [ChatUIKitEventAction]。
List<ChatUIKitEventAction>? morePressActions,
MessageItemBuilder? itemBuilder,
MessageItemBuilder? alertItemBuilder,
FocusNode? focusNode,
Widget? emojiWidget,
Widget? Function(BuildContext context, MessageModel replyMessage)?
replyBarBuilder,
Widget Function(BuildContext context, QuoteModel model)? quoteBuilder,
bool Function(BuildContext context, MessageModel message)?
onErrorBtnTapHandler,
MessageItemBubbleBuilder? bubbleBuilder,
MessageItemBuilder? bubbleContentBuilder,
MessagesViewMorePressHandler? onMoreActionsItemsHandler,
MessagesViewItemLongPressPositionHandler? onItemLongPressHandler,
ChatUIKitKeyboardPanelController? inputController,
bool? enableAppBar,
bool? forceLeft,
Widget? multiSelectBottomBar,
ChatUIKitViewObserver? viewObserver,
String? attributes,
MessageReactionItemTapHandler? onReactionItemTap,
MessageItemTapHandler? onReactionInfoTap,
MessageItemBuilder? reactionItemsBuilder,
MessageItemTapHandler? onThreadItemTap,
MessageItemBuilder? threadItemBuilder,
Widget? backgroundWidget,
}) {
return MessagesViewArguments(
profile: profile ?? this.profile,
controller: controller ?? this.controller,
appBarModel: appBarModel ?? this.appBarModel,
inputBar: inputBar ?? this.inputBar,
showMessageItemAvatar:
showMessageItemAvatar ?? this.showMessageItemAvatar,
showMessageItemNickname:
showMessageItemNickname ?? this.showMessageItemNickname,
onItemTap: onItemTap ?? this.onItemTap,
onDoubleTap: onDoubleTap ?? this.onDoubleTap,
onAvatarTap: onAvatarTap ?? this.onAvatarTap,
onAvatarLongPress: onAvatarLongPress ?? this.onAvatarLongPress,
onNicknameTap: onNicknameTap ?? this.onNicknameTap,
morePressActions: morePressActions ?? this.morePressActions,
itemBuilder: itemBuilder ?? this.itemBuilder,
alertItemBuilder: alertItemBuilder ?? this.alertItemBuilder,
emojiWidget: emojiWidget ?? this.emojiWidget,
replyBarBuilder: replyBarBuilder ?? this.replyBarBuilder,
quoteBuilder: quoteBuilder ?? this.quoteBuilder,
onErrorBtnTapHandler: onErrorBtnTapHandler ?? this.onErrorBtnTapHandler,
bubbleBuilder: bubbleBuilder ?? this.bubbleBuilder,
bubbleContentBuilder: bubbleContentBuilder ?? this.bubbleContentBuilder,
onMoreActionsItemsHandler:
onMoreActionsItemsHandler ?? this.onMoreActionsItemsHandler,
onItemLongPressHandler:
onItemLongPressHandler ?? this.onItemLongPressHandler,
enableAppBar: enableAppBar ?? this.enableAppBar,
inputController: inputController ?? this.inputController,
forceLeft: forceLeft ?? this.forceLeft,
multiSelectBottomBar: multiSelectBottomBar ?? this.multiSelectBottomBar,
viewObserver: viewObserver ?? this.viewObserver,
attributes: attributes ?? this.attributes,
onReactionItemTap: onReactionItemTap ?? this.onReactionItemTap,
onReactionInfoTap: onReactionInfoTap ?? this.onReactionInfoTap,
reactionItemsBuilder: reactionItemsBuilder ?? this.reactionItemsBuilder,
onThreadItemTap: onThreadItemTap ?? this.onThreadItemTap,
threadItemBuilder: threadItemBuilder ?? this.threadItemBuilder,
backgroundWidget: backgroundWidget ?? this.backgroundWidget,
);
}