ConversationsViewArguments class

会话列表构建参数

Implemented types

Constructors

ConversationsViewArguments({ConversationListViewController? controller, ChatUIKitAppBarModel? appBarModel, void onSearchTap(List<ConversationItemModel> data)?, List<Widget>? beforeWidgets, List<Widget>? afterWidgets, ConversationItemBuilder? itemBuilder, void onItemTap(BuildContext context, ConversationItemModel info)?, ConversationsViewItemLongPressHandler? onItemLongPressHandler, String? searchBarHideText, Widget? emptyBackground, bool enableAppBar = true, bool enableSearchBar = true, ChatUIKitViewObserver? viewObserver, ChatUIKitMoreActionsBuilder? moreActionsBuilder, bool enablePinHighlight = true, Widget? backgroundWidget, String? attributes})

Properties

afterWidgets List<Widget>?
会话列表之后的数据。
final
appBarModel ChatUIKitAppBarModel?
final
attributes String?
View 附加属性,设置后的内容将会带入到下一个页面。
getter/setter pairoverride
backgroundWidget Widget?
背景组件,如果设置后将会替换默认的背景组件。
final
beforeWidgets List<Widget>?
会话列表之前的数据。
final
controller ConversationListViewController?
会话列表控制器,用户管理会话列表数据,如果不设置将会自动创建。详细参考 ConversationListViewController
final
emptyBackground Widget?
会话列表的背景,会话为空时会显示,如果设置后将会替换默认的背景。
final
enableAppBar bool
是否显示AppBar, 默认为 true。 当为 false 时将不会显示AppBar。同时也会影响到是否显示标题。
final
enablePinHighlight bool
final
enableSearchBar bool
是否开启搜索框,默认为 true。如果设置为 false 将不会显示搜索框。
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder ConversationItemBuilder?
会话列表的 item 构建器,如果设置后需要显示会话时会直接回调,如果不处理可以返回 null
final
moreActionsBuilder ChatUIKitMoreActionsBuilder?
final
onItemLongPressHandler ConversationsViewItemLongPressHandler?
长按会话列表的回调,如果不设置默认会弹出默认的长按菜单。如果设置长按时会把默认的弹出菜单项传给你,你需要调整后返回来,返回来的数据会用于菜单显示,如果返回 null 将不会显示菜单。
final
onItemTap → void Function(BuildContext context, ConversationItemModel info)?
点击会话列表的回调,点击后会把当前的会话数据传递过来。具体参考 ConversationItemModel。 如果不是设置默认会跳转到消息页面。具体参考 MessagesView
final
onSearchTap → void Function(List<ConversationItemModel> data)?
点击搜索按钮的回调,点击后会把当前的会话列表数据传递过来。如果不设置默认会跳转到搜索页面。具体参考 SearchView
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarHideText String?
会话搜索框的隐藏文字。
final
viewObserver ChatUIKitViewObserver?
getter/setter pairoverride

Methods

copyWith({ConversationListViewController? controller, ChatUIKitAppBarModel? appBarModel, void onSearchTap(List<ConversationItemModel> data)?, List<NeedAlphabeticalWidget>? beforeWidgets, List<NeedAlphabeticalWidget>? afterWidgets, ChatUIKitListItemBuilder? itemBuilder, void onItemTap(BuildContext context, ConversationItemModel model)?, ConversationsViewItemLongPressHandler? onItemLongPressHandler, String? searchBarHideText, Widget? emptyBackground, bool? enableAppBar, bool? enableSearchBar, ChatUIKitViewObserver? viewObserver, ChatUIKitMoreActionsBuilder? moreActionsBuilder, String? attributes, bool? enablePinHighlight, Widget? backgroundWidget}) ConversationsViewArguments
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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