copyWith method

ConversationsViewArguments copyWith({
  1. ConversationListViewController? controller,
  2. ChatUIKitAppBarModel? appBarModel,
  3. void onSearchTap(
    1. List<ConversationItemModel> data
    )?,
  4. List<NeedAlphabeticalWidget>? beforeWidgets,
  5. List<NeedAlphabeticalWidget>? afterWidgets,
  6. ChatUIKitListItemBuilder? itemBuilder,
  7. void onItemTap(
    1. BuildContext context,
    2. ConversationItemModel model
    )?,
  8. ConversationsViewItemLongPressHandler? onItemLongPressHandler,
  9. String? searchBarHideText,
  10. Widget? emptyBackground,
  11. bool? enableAppBar,
  12. bool? enableSearchBar,
  13. ChatUIKitViewObserver? viewObserver,
  14. ChatUIKitMoreActionsBuilder? moreActionsBuilder,
  15. String? attributes,
  16. bool? enablePinHighlight,
  17. Widget? backgroundWidget,
})

Implementation

ConversationsViewArguments copyWith({
  ConversationListViewController? controller,
  ChatUIKitAppBarModel? appBarModel,
  void Function(List<ConversationItemModel> data)? onSearchTap,
  List<NeedAlphabeticalWidget>? beforeWidgets,
  List<NeedAlphabeticalWidget>? afterWidgets,
  ChatUIKitListItemBuilder? itemBuilder,
  void Function(BuildContext context, ConversationItemModel model)? onItemTap,
  ConversationsViewItemLongPressHandler? onItemLongPressHandler,
  String? searchBarHideText,
  Widget? emptyBackground,
  bool? enableAppBar,
  bool? enableSearchBar,
  ChatUIKitViewObserver? viewObserver,
  ChatUIKitMoreActionsBuilder? moreActionsBuilder,
  String? attributes,
  bool? enablePinHighlight,
  Widget? backgroundWidget,
}) {
  return ConversationsViewArguments(
    controller: controller ?? this.controller,
    appBarModel: appBarModel ?? this.appBarModel,
    onSearchTap: onSearchTap ?? this.onSearchTap,
    beforeWidgets: beforeWidgets ?? this.beforeWidgets,
    afterWidgets: afterWidgets ?? this.afterWidgets,
    itemBuilder: itemBuilder ?? this.itemBuilder,
    onItemTap: onItemTap ?? this.onItemTap,
    enableSearchBar: enableSearchBar ?? this.enableSearchBar,
    onItemLongPressHandler:
        onItemLongPressHandler ?? this.onItemLongPressHandler,
    searchBarHideText: searchBarHideText ?? this.searchBarHideText,
    emptyBackground: emptyBackground ?? this.emptyBackground,
    enableAppBar: enableAppBar ?? this.enableAppBar,
    viewObserver: viewObserver ?? this.viewObserver,
    attributes: attributes ?? this.attributes,
    moreActionsBuilder: moreActionsBuilder ?? this.moreActionsBuilder,
    enablePinHighlight: enablePinHighlight ?? this.enablePinHighlight,
    backgroundWidget: backgroundWidget ?? this.backgroundWidget,
  );
}