CometChatAddMembers class

CometChatAddMembers is a component that internally uses CometChatUsers component to display a list of users who can be added to a particular group

  CometChatAddMembers(
  group: Group(guid: 'guid', name: 'name', type: 'public'),
  addMembersStyle: AddMembersStyle(),
);
Inheritance

Constructors

CometChatAddMembers({Key? key, String? title, String? searchPlaceholder, Widget? backButton, bool showBackButton = true, Widget? searchIcon, bool? hideSearch = false, CometChatTheme? theme, dynamic onSelection(List<User>?, BuildContext)?, required Group group, AddMembersStyle? addMembersStyle, Widget? subtitleView(BuildContext, User)?, bool? disableUsersPresence, Widget listItemView(User)?, List<CometChatOption>? options(User, CometChatUsersController controller)?, bool? hideSeparator, List<Widget> appBarOptions(BuildContext context)?, SelectionMode selectionMode = SelectionMode.multiple, String? errorStateText, String? emptyStateText, UsersRequestBuilder? usersRequestBuilder, UsersBuilderProtocol? usersProtocol, bool? hideError, WidgetBuilder? loadingStateView, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, VoidCallback? onBack, Widget? selectionIcon, OnError? onError, AvatarStyle? avatarStyle, ListItemStyle? listItemStyle, StatusIndicatorStyle? statusIndicatorStyle, Widget? submitIcon})

Properties

addMembersStyle AddMembersStyle?
addMembersStyle provides styling to this widget
final
appBarOptions List<Widget> Function(BuildContext context)?
appBarOptions custom options shown in the app bar
final
avatarStyle AvatarStyle?
avatarStyle set style for avatar
final
backButton Widget?
backButton back button widget
final
disableUsersPresence bool?
disableUsersPresence controls visibility of status indicator shown if user is online
final
emptyStateText String?
emptyStateText text to be displayed when the list is empty
final
emptyStateView WidgetBuilder?
emptyStateView returns view fow empty state
final
errorStateText String?
errorStateText text to be displayed when error occurs
final
errorStateView WidgetBuilder?
errorStateView returns view fow error state behind the dialog
final
hashCode int
The hash code for this object.
no setterinherited
hideError bool?
hideError toggle visibility of error dialog
final
hideSearch bool?
hideSearch switch visibility of search input
final
hideSeparator bool?
hideSeparator controls visibility of the separator
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listItemStyle ListItemStyle?
listItemStyle style for every list item
final
listItemView Widget Function(User)?
listItemView provides custom view for list item
final
loadingStateView WidgetBuilder?
loadingStateView returns view fow loading state
final
onBack VoidCallback?
onBack callback triggered on closing this screen
final
onError OnError?
onError callback triggered in case any error happens when fetching users or adding members
final
onSelection → dynamic Function(List<User>?, BuildContext)?
onSelection method will be performed on complete selection
final
options List<CometChatOption>? Function(User, CometChatUsersController controller)?
options are the actions available on swiping the user item
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchIcon Widget?
searchIcon replace search icon
final
searchPlaceholder String?
searchPlaceholder placeholder text of search input
final
selectionIcon Widget?
selectionIcon will override the default selection complete icon
final
selectionMode SelectionMode
selectionMode specifies mode users module is opening in
final
showBackButton bool
showBackButton switch visibility of back button
final
statusIndicatorStyle StatusIndicatorStyle?
statusIndicatorStyle set style for status indicator
final
submitIcon Widget?
submitIcon will override the default selection complete icon
final
subtitleView Widget? Function(BuildContext, User)?
subtitleView provides custom view for subtitle in list item
final
theme CometChatTheme?
theme set custom theme
final
title String?
title Title of the component
final
usersProtocol UsersBuilderProtocol?
usersProtocol set custom request builder
final
usersRequestBuilder UsersRequestBuilder?
usersRequestBuilder custom request builder
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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