getLink method

String getLink(
  1. String profileName,
  2. String id
)

Implementation

String getLink(String profileName, String id) {
  var matches = profiles[profileName] ?? [];
  var idx = findIndexFromProfileId(matches, id, config);
  if (idx == -1) {
    throw AppException("There is no pattern for profile profileName");
  }
  return (matches[idx].pattern ?? '').replaceAll('{PROFILE_ID}', trim(id));
}