StringTextNode constructor

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

Implementation

StringTextNode({
  required super.path,
  required super.rawPath,
  required super.modifiers,
  required super.locale,
  required super.types,
  required super.raw,
  required super.comment,
  required super.shouldEscape,
  required super.handleTypes,
  required super.interpolation,
  required super.paramCase,
  Map<String, Set<String>>? linkParamMap,
}) {
  final parsedResult = _parseInterpolation(
    locale: locale,
    types: types,
    raw: shouldEscape ? _escapeContent(raw, interpolation) : raw,
    interpolation: interpolation,
    defaultType: 'Object',
    paramCase: paramCase,
    digestParameter: handleTypes && true,
  );
  _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;
}