getDefaultSubtitleView method

Widget? getDefaultSubtitleView(
  1. BuildContext context,
  2. CometChatTheme theme,
  3. CometChatDetailsController detailsController
)

Implementation

Widget? getDefaultSubtitleView(BuildContext context, CometChatTheme theme, CometChatDetailsController detailsController){
  String subtitleText;
  if (detailsController.user != null) {
    if(detailsController.userIsNotBlocked()) {
      subtitleText = detailsController.user?.status ?? "";
    } else {
      return null;
    }
  } else {
    subtitleText =
    "${detailsController.membersCount} ${Translations.of(context).members}";
  }
  return Text(subtitleText,
      style: TextStyle(
          fontSize: theme.typography.subtitle1.fontSize,
          fontWeight: theme.typography.subtitle1.fontWeight,
          fontFamily: theme.typography.subtitle1.fontFamily,
          color: theme.palette.getAccent600()));
}