RTPropertyString.fromString constructor
RTPropertyString.fromString(})
Implementation
factory RTPropertyString.fromString(
String? propertyString, {
String? delimiter,
String? splitDelimiter,
}) {
if (propertyString == null) return RTPropertyString(items: []);
return RTPropertyString(
items: propertyString.split(delimiter ?? defaultDelimiter).map((e) {
try {
return RTPropertyStringItem(
key: e.split(splitDelimiter ?? defaultSplitDelimiter)[0],
value: e.split(splitDelimiter ?? defaultSplitDelimiter)[1],
);
} catch (error) {
return RTPropertyStringItem(
key: e,
value: '',
);
}
}).toList(),
);
}