CometChatGroups class
CometChatGroups is a component that displays a list of groups available in the app with the help of CometChatListBase and CometChatListItem fetched groups are listed down alphabetically and in order of recent activity groups are fetched using GroupsBuilderProtocol and GroupsRequestBuilder
CometChatGroups(
groupsStyle: GroupsStyle(),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CometChatGroups
Constructors
-
CometChatGroups.new({Key? key, GroupsBuilderProtocol? groupsProtocol, Widget? subtitleView(BuildContext, Group)?, Widget listItemView(Group)?, GroupsStyle groupsStyle = const GroupsStyle(), ScrollController? controller, CometChatTheme? theme, String? searchPlaceholder, Widget? backButton, bool showBackButton = true, Widget? searchBoxIcon, bool hideSearch = false, SelectionMode? selectionMode, dynamic onSelection(List<
Group> ?)?, String? title, String? errorStateText, String? emptyStateText, dynamic stateCallBack(CometChatGroupsController controller)?, GroupsRequestBuilder? groupsRequestBuilder, bool? hideError, WidgetBuilder? loadingStateView, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, ListItemStyle? listItemStyle, List<CometChatOption> ? options(Group group, CometChatGroupsController controller, BuildContext context)?, AvatarStyle? avatarStyle, StatusIndicatorStyle? statusIndicatorStyle, bool hideSeparator = false, List<Widget> appBarOptions(BuildContext context)?, Widget? passwordGroupIcon, Widget? privateGroupIcon, ActivateSelection? activateSelection, VoidCallback? onBack, dynamic onItemTap(BuildContext, Group)?, dynamic onItemLongPress(BuildContext, Group)?, OnError? onError, Widget? submitIcon, Widget? selectionIcon, bool? hideAppbar = false, String? controllerTag}) -
const
Properties
- activateSelection → ActivateSelection?
-
activateSelection lets the widget know if groups 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
- 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
- emptyStateText → String?
-
emptyStateText text to be displayed when the list is empty
final
- emptyStateView → WidgetBuilder?
-
emptyStateView returns view for empty state
final
- errorStateText → String?
-
errorStateText text to be displayed when error occur
final
- errorStateView → WidgetBuilder?
-
errorStateView returns view for error state behind the dialog
final
- groupsProtocol → GroupsBuilderProtocol?
-
groupsProtocol set custom groups request builder protocol
final
- groupsRequestBuilder → GroupsRequestBuilder?
-
groupsRequestBuilder custom request builder
final
- groupsStyle → GroupsStyle
-
groupsStyle sets style
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/ff search input
final
- hideSeparator → bool
-
hideSeparator
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(Group)?
-
listItemView set custom view for each group
final
- loadingStateView → WidgetBuilder?
-
loadingStateView returns view for loading state
final
- onBack → VoidCallback?
-
onBack callback triggered on closing this screen
final
- onError → OnError?
-
onError callback triggered on error
final
- onItemLongPress → dynamic Function(BuildContext, Group)?
-
onItemLongPress callback triggered on pressing for long on a group item
final
- onItemTap → dynamic Function(BuildContext, Group)?
-
onItemTap callback triggered on tapping a group item
final
-
onSelection
→ dynamic Function(List<
Group> ?)? -
onSelection function will be performed
final
-
options
→ List<
CometChatOption> ? Function(Group group, CometChatGroupsController controller, BuildContext context)? -
options set options which will be visible at slide of each banned member
final
- passwordGroupIcon → Widget?
-
passwordGroupIcon sets icon in status indicator for password group
final
- privateGroupIcon → Widget?
-
privateGroupIcon sets icon in status indicator for private group
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 change selection icon
final
- selectionMode → SelectionMode?
-
selectionMode specifies mode groups module is opening in
final
- showBackButton → bool
-
showBackButton switch on/off back button
final
- stateCallBack → dynamic Function(CometChatGroupsController controller)?
-
stateCallBack to access controller functions from parent pass empty reference of CometChatGroupsController object
final
- statusIndicatorStyle → StatusIndicatorStyle?
-
statusIndicatorStyle set style for status indicator
final
- submitIcon → Widget?
-
submitIcon will override the default submit icon
final
- subtitleView → Widget? Function(BuildContext, Group)?
-
subtitleView to set subtitle for each group
final
- theme → CometChatTheme?
-
theme can pass custom theme
final
- title → String?
-
title sets title for the list
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CometChatGroups> -
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