StringTextNode constructor
StringTextNode({
- required String path,
- required String rawPath,
- required Map<
String, String> modifiers, - required I18nLocale locale,
- required Map<
String, FormatTypeInfo> types, - required String raw,
- required String? comment,
- required bool shouldEscape,
- required bool handleTypes,
- required StringInterpolation interpolation,
- required CaseStyle? paramCase,
- Map<
String, Set< ? linkParamMap,String> >
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;
}