Status Indicator
CometChatStatusIndicator
is a component which indicates whether user is online or offline. You can customize the border
and background color
of this component.
How to integrate CometChatStatusIndicator?
Since CometChatStatusIndicator
is a stateless widget, it can be added directly in the build method. CometChatStatusIndicator
includes various parameters to customize its UI.
Usage
- Dart
CometChatStatusIndicator(
backgroundColor: Colors.green,
);
Properties
Parameters | Type | Description |
---|---|---|
backgroundImage | Widget | used to set the icon in status indicator |
backgroundColor | Color | used to set the background color of the status indicator |
style | StatusIndicatorStyle | used to set border of custom style |
StatusIndicatorStyle
Parameters | Type | Description |
---|---|---|
borderRadius | double | used to set the border radius |
height | double | used to set the height |
width | double | used to set width |
border | BoxBorder | used to set border of status indicator |
gradient | Gradient | used to set a gradient background |
Usage
- Dart
CometChatStatusIndicator(
backgroundColor: Colors.pink,
style: StatusIndicatorStyle(
borderRadius: 24,
width: 20,
height: 20,
)
);