replaceMapValue static method

String replaceMapValue(
  1. String input,
  2. Map<String, String> mapPattern
)

Implementation

static String replaceMapValue(String input, Map<String, String> mapPattern) => input.replaceAllMapped(
  RegExp(mapPattern.keys.join("|"), caseSensitive: false),
  (Match match) => mapPattern[match.group(0)]!,
);