CometChatOption class
CometChatOption is a model class which is used to execute any action on a CometChatListItem
CometChatOption option = CometChatOption(
id: '1',
title: 'Option 1',
icon: 'https://example.com/icon.png',
packageName: 'com.example.package',
titleStyle: TextStyle(
color: Colors.black,
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
backgroundColor: Colors.white,
iconTint: Colors.blue,
onClick: () {
// Do something when this option is clicked
}
);
Constructors
Properties
- backgroundColor ↔ Color?
-
backgroundColor background color for option
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon ↔ String?
-
to pass icon url
getter/setter pair
- iconTint ↔ Color?
-
iconTint tint color for icon
getter/setter pair
- id ↔ String
-
unique id for an option
getter/setter pair
- onClick ↔ dynamic Function()?
-
onClick callback function for option
getter/setter pair
- packageName ↔ String?
-
to pass package name for the used icon
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title ↔ String?
-
title passes title to option
getter/setter pair
- titleStyle ↔ TextStyle?
-
titleStyle styling property for title
getter/setter pair
Methods
-
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