createBody method

  1. @visibleForTesting
String createBody(
  1. NoticeRecord record
)

Implementation

@visibleForTesting
String createBody(NoticeRecord record) {
  final message = record.message;
  if (message is Iterable || message is Map) {
    final encoder =
        JsonEncoder.withIndent('  ' * jsonIndent, (v) => v.toString());
    return encoder.convert(message);
  }
  return record.message.toString();
}