updateWithLinkParams method

void updateWithLinkParams({
  1. required Map<String, Set<String>>? linkParamMap,
  2. required Map<String, String> paramTypeMap,
})

Updates content, params and paramTypeMap according to the new linked parameters

Implementation

void updateWithLinkParams({
  required Map<String, Set<String>>? linkParamMap,
  required Map<String, String> paramTypeMap,
}) {
  this._paramTypeMap = paramTypeMap;

  // build a temporary TextNode to get the updated content and params
  final temp = StringTextNode(
    path: path,
    raw: raw,
    comment: comment,
    interpolation: interpolation,
    paramCase: paramCase,
    linkParamMap: linkParamMap,
  );

  this._params = temp.params;
  this._content = temp.content;
}