updateWithLinkParams method

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

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

Implementation

@override
void updateWithLinkParams({
  required Map<String, Set<String>> linkParamMap,
  required Map<String, String> paramTypeMap,
}) {
  _paramTypeMap = paramTypeMap;
  _params.addAll(linkParamMap.values.expand((e) => e));

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

  _content = temp.content;
}