sample property

String sample

ProMessages can be sent with replacement text mappings this will display a "sample" based on those replacements.

Implementation

String get sample {
  var s = components.join('');
  if (mapping.isNotEmpty) {
    for (var k in keys) {
      var search = '\${$k}';
      var replace = mapping[k] ?? '';
      if (replace.isNotEmpty) s = s.replaceAll(search, replace);
    }
  }
  return s;
}