Skip to main content

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

CometChatStatusIndicator(
backgroundColor: Colors.green,
);

Properties

ParametersTypeDescription
backgroundImageWidgetused to set the icon in status indicator
backgroundColorColorused to set the background color of the status indicator
styleStatusIndicatorStyleused to set border of custom style

StatusIndicatorStyle

ParametersTypeDescription
borderRadiusdoubleused to set the border radius
heightdoubleused to set the height
widthdoubleused to set width
borderBoxBorderused to set border of status indicator
gradientGradientused to set a gradient background

Usage

CometChatStatusIndicator(
backgroundColor: Colors.pink,
style: StatusIndicatorStyle(
borderRadius: 24,
width: 20,
height: 20,
)
);