UsersConfiguration class
UsersConfiguration is a data class that has configuration properties to customize the functionality and appearance of CometChatUsers can be used by a component where CometChatUsers is a child component
UsersConfiguration(
usersStyle: UsersStyle(),
avatarStyle: AvatarStyle(),
listItemStyle: ListItemStyle(),
statusIndicatorStyle: StatusIndicatorStyle(),
);
Constructors
-
UsersConfiguration({String? title, String? searchPlaceholder, bool? showBackButton, bool? hideSearch, UsersRequestBuilder? usersRequestBuilder, Widget? subtitleView(BuildContext, User)?, bool? hideSeparator, Widget listItemView(User)?, UsersStyle? usersStyle, List<
CometChatOption> ? options(User, CometChatUsersController controller)?, Widget? backButton, Widget? searchBoxIcon, CometChatTheme? theme, SelectionMode? selectionMode, dynamic onSelection(List<User> ?, BuildContext)?, String? emptyStateText, String? errorStateText, WidgetBuilder? loadingStateView, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, ListItemStyle? listItemStyle, AvatarStyle? avatarStyle, StatusIndicatorStyle? statusIndicatorStyle, List<Widget> appBarOptions(BuildContext context)?, bool? hideSectionSeparator, bool? disableUsersPresence, ActivateSelection? activateSelection, bool? hideError, dynamic stateCallBack(CometChatUsersController controller)?, ScrollController? controller, UsersBuilderProtocol? usersProtocol, OnError? onError, VoidCallback? onBack, dynamic onItemTap(BuildContext context, User)?, dynamic onItemLongPress(BuildContext context, User)?, Widget? selectionIcon, Widget? submitIcon, bool? hideAppbar, Widget? chatAvatar({String? name, required bool online, Color? rimColor, double? size, required String url})?, Widget? chatConversationItem({required String avatarName, String? avatarUrl, bool? isGroupChat, String? lastAction, bool? online, String? subtitle, DateTime? time, required String title, int? unreadCount})?, String? controllerTag}) -
const
Properties
- activateSelection → ActivateSelection?
-
activateSelection lets the widget know if users are allowed to be selected
final
-
appBarOptions
→ List<
Widget> Function(BuildContext context)? -
appBarOptions list of options to be visible in app bar
final
- avatarStyle → AvatarStyle?
-
avatarStyle set style for avatar
final
- backButton → Widget?
-
backButton back button
final
- chatAvatar → Widget? Function({String? name, required bool online, Color? rimColor, double? size, required String url})?
-
CUSTOM WIDGETS
final
- chatConversationItem → Widget? Function({required String avatarName, String? avatarUrl, bool? isGroupChat, String? lastAction, bool? online, String? subtitle, DateTime? time, required String title, int? unreadCount})?
-
final
- controller → ScrollController?
-
controller sets controller for the list
final
- controllerTag → String?
-
Group tag to create from , if this is passed its parent responsibility to close this
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 occur
final
- errorStateView → WidgetBuilder?
-
errorStateView returns view fow error state behind the dialog
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideAppbar → bool?
-
hideAppbar toggle visibility for app bar
final
- hideError → bool?
-
hideError toggle visibility of error dialog
final
- hideSearch → bool?
-
hideSearch switch on/off search input
final
- hideSectionSeparator → bool?
-
hideSeparator toggle visibility of separator
final
- hideSeparator → bool?
-
hideSeparator toggle visibility of separator
final
- listItemStyle → ListItemStyle?
-
listItemStyle style for every list item
final
- listItemView → Widget Function(User)?
-
listItemView set custom view for each user
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
final
- onItemLongPress → dynamic Function(BuildContext context, User)?
-
onItemLongPress callback triggered on pressing for long on a user item
final
- onItemTap → dynamic Function(BuildContext context, User)?
-
onItemTap callback triggered on tapping a user item
final
-
onSelection
→ dynamic Function(List<
User> ?, BuildContext)? -
onSelection function will be performed
final
-
options
→ List<
CometChatOption> ? Function(User, CometChatUsersController controller)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBoxIcon → Widget?
-
searchBoxIcon 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 on/off back button
final
- stateCallBack → dynamic Function(CometChatUsersController controller)?
-
stateCallBack to access controller functions from parent pass empty reference of CometChatUsersController object
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 to set subtitle for each user
final
- theme → CometChatTheme?
-
theme can pass custom theme
final
- title → String?
-
title Title of the user list component
final
- usersProtocol → UsersBuilderProtocol?
-
usersProtocol set custom users request builder protocol
final
- usersRequestBuilder → UsersRequestBuilder?
-
usersRequestBuilder custom request builder
final
- usersStyle → UsersStyle?
-
usersStyle sets style for the CometChatUsers
final
Methods
-
merge(
UsersConfiguration mergeWith) → UsersConfiguration -
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