StringTextNode constructor

StringTextNode({
  1. required String path,
  2. required String rawPath,
  3. required Map<String, String> modifiers,
  4. required String raw,
  5. required String? comment,
  6. required bool shouldEscape,
  7. required StringInterpolation interpolation,
  8. required CaseStyle? paramCase,
  9. Map<String, Set<String>>? linkParamMap,
})

Implementation

StringTextNode({
  required super.path,
  required super.rawPath,
  required super.modifiers,
  required super.raw,
  required super.comment,
  required super.shouldEscape,
  required super.interpolation,
  required super.paramCase,
  Map<String, Set<String>>? linkParamMap,
}) {
  final parsedResult = _parseInterpolation(
    raw: shouldEscape ? _escapeContent(raw, interpolation) : raw,
    interpolation: interpolation,
    defaultType: 'Object',
    paramCase: paramCase,
  );
  _params = parsedResult.params.keys.toSet();
  _paramTypeMap.addAll(parsedResult.params);

  if (linkParamMap != null) {
    _params.addAll(linkParamMap.values.expand((e) => e));
  }

  final parsedLinksResult = _parseLinks(
    input: parsedResult.parsedContent,
    linkParamMap: linkParamMap,
  );

  _links = parsedLinksResult.links;
  _content = parsedLinksResult.parsedContent;
}