ConversationsView class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ConversationsView
Constructors
-
ConversationsView({ConversationItemBuilder? itemBuilder, List<
Widget> ? beforeWidgets, List<Widget> ? afterWidgets, void onSearchTap(List<ConversationItemModel> data)?, String? searchBarHideText, Widget? emptyBackground, void onItemTap(BuildContext context, ConversationItemModel info)?, ConversationsViewItemLongPressHandler? onItemLongPressHandler, ChatUIKitAppBarModel? appBarModel, ConversationListViewController? controller, bool enableAppBar = true, bool enableSearchBar = true, String? attributes, ChatUIKitViewObserver? viewObserver, ChatUIKitMoreActionsBuilder? moreActionsBuilder, bool enablePinHighlight = true, Widget? backgroundWidget, Key? key}) -
会话列表构造方法,如果需要自定义会话列表可以使用这个方法。
const
- ConversationsView.arguments(ConversationsViewArguments arguments, {Key? key})
- 会话列表构造方法,如果需要自定义会话列表可以使用这个方法。具体参考 ConversationsViewArguments。
Properties
-
afterWidgets
→ List<
Widget> ? -
会话列表之后的数据。
final
- appBarModel → ChatUIKitAppBarModel?
-
会话列表的AppBar模型,用于自定义AppBar。具体参考 ChatUIKitAppBarModel。
final
- attributes → String?
-
View 附加属性,设置后的内容将会带入到下一个页面。
final
- backgroundWidget → Widget?
-
背景组件,如果设置后将会替换默认的背景组件。
final
-
beforeWidgets
→ List<
Widget> ? -
会话列表之前的数据。
final
- controller → ConversationListViewController?
-
会话列表控制器,用户管理会话列表数据,如果不设置将会自动创建。详细参考 ConversationListViewController。
final
- emptyBackground → Widget?
-
会话列表的背景,会话为空时会显示,如果设置后将会替换默认的背景。
final
- enableAppBar → bool
-
是否显示AppBar, 默认为
true
。 当为false
时将不会显示AppBar。同时也会影响到是否显示标题。final - enablePinHighlight → bool
-
是否开启置顶消息点击高亮,默认为
true
。如果设置为false
将不会显示置顶高亮。final - enableSearchBar → bool
-
是否开启搜索框,默认为
true
。如果设置为false
将不会显示搜索框。final - hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → ConversationItemBuilder?
-
会话列表的
item
构建器,如果设置后需要显示会话时会直接回调,如果不处理可以返回null
。final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- 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?
-
用于刷新页面的Observer
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ConversationsView> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited