otherKeyValue method

  1. @override
String otherKeyValue(
  1. String myString,
  2. KeyValue k
)
override

Implementation

@override
String otherKeyValue(String myString, KeyValue k) {
  if (k.key == theImage) {
    var value = k.value;
    var url = image(k);
    if (url != null) {
      myString = k.replaceParamInStringWithString(myString, url);
    } else {
      myString = k.replaceParamInStringWithString(
          // ignore: prefer_single_quotes
          myString,
          "Image with reference $value does not exist");
    }
    return myString;
  } else {
    return super.otherKeyValue(myString, k);
  }
}