getChangeGroupIntroductionDisplayString static method

String getChangeGroupIntroductionDisplayString(
  1. ChangeGroupIntroductionSystemMessage systemMessage,
  2. BuildContext context
)

Implementation

static String getChangeGroupIntroductionDisplayString(
    ChangeGroupIntroductionSystemMessage systemMessage, BuildContext context) {
  AtomicLocalizations localizations = AtomicLocalizations.of(context);
  String operator = systemMessage.groupIntroductionOperator;
  String groupIntroduction = systemMessage.groupIntroduction;
  if (groupIntroduction.isNotEmpty) {
    return '$operator ${localizations.groupIntroChangedTo} $groupIntroduction';
  } else {
    return '$operator ${localizations.groupIntroDeleted}';
  }
}