create static method
Implementation
static TextProperty? create(String name, String? value,
{String? language, Uri? alternateRepresentation}) {
if (value == null) {
return null;
}
value = value.replaceAll(',', '\\,');
value = value.replaceAll('\n', '\\n');
final prop = TextProperty('$name:$value');
if (language != null) {
prop.setParameter(
TextParameter.value(ParameterType.language.typeName ?? '', language),
);
}
if (alternateRepresentation != null) {
prop.setParameter(
UriParameter.value(
ParameterType.alternateRepresentation.typeName ?? '',
alternateRepresentation,
),
);
}
return prop;
}