process method

String process(
  1. String text,
  2. Map<String, String> purposeDict
)

Implementation

String process(String text, Map<String, String> purposeDict) {
  purposeDict.forEach((key, value) {
    text = text.replaceAll(key, value);
  });
  return text.trim();
}