CometChatDetailsOption class
CometChatDetailsOption is a model class which contains information about options available for every CometChatDetailsTemplate
CometChatDetailsOption option = CometChatDetailsOption(
id: 'option1',
title: 'Option 1',
icon: 'icon_url',
packageName: 'com.example.package',
titleStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
customView: Container(
height: 100,
width: 100,
color: Colors.red,
),
tail: Icon(Icons.arrow_forward),
height: 50.0,
onClick: (User? user, Group? group, String section, CometChatDetailsController state) {
// do something on click
},
);
- Inheritance
-
- Object
- CometChatBaseOptions
- CometChatDetailsOption
Constructors
- CometChatDetailsOption.new({Widget? customView, dynamic onClick(User? user, Group? group, String section, CometChatDetailsControllerProtocol state)?, Widget? tail, required String id, double? height, String? title, String? icon, String? packageName, TextStyle? titleStyle})
-
CometChatDetailsOption constructor requires
id
,title
andonClick
while initializing.
Properties
- backgroundColor ↔ Color?
-
backgroundColor background color for option
getter/setter pairinherited
- customView ↔ Widget?
-
to pass custom view to options
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ double?
-
to pass height for details
getter/setter pair
- icon ↔ String?
-
to pass icon url
getter/setter pairinherited
- iconTint ↔ Color?
-
iconTint tint color for icon
getter/setter pairinherited
- id ↔ String
-
unique id foe any option
getter/setter pairinherited
- onClick ↔ dynamic Function(User? user, Group? group, String section, CometChatDetailsControllerProtocol state)?
-
onClick call function which takes 3 parameter , and one of user or group is populated at a time
getter/setter pair
- packageName ↔ String?
-
to pass package name for the used icon
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tail ↔ Widget?
-
to pass tail component for detail option
getter/setter pair
- title ↔ String?
-
title passes title to option
getter/setter pairinherited
- titleStyle ↔ TextStyle?
-
titleStyle styling property for title
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited