matchesJSONEntry method

bool matchesJSONEntry(
  1. String key,
  2. String value,
  3. bool text
)

Implementation

bool matchesJSONEntry(String key, String value, bool text) {
  if (hasMessage && message.contains(key) && message.contains(value)) {
    var entryValue = text ? '"$value"' : value;
    return RegExp('"$key":\\s*$entryValue').hasMatch(message);
  }
  return false;
}