ICalendar.fromString constructor
Parse an ICalendar object from a String. The parameter
icsString
will be split using LineSplitter then calling
ICalendar.fromLines
.
The first line must be BEGIN:VCALENDAR
, and the last line must be
END:VCALENDAR
.
The body MUST include the "PRODID" and "VERSION" calendar properties.
Implementation
factory ICalendar.fromString(String icsString, {bool allowEmptyLine = true}) {
final strBuffer = StringBuffer(icsString);
const lineSplitter = LineSplitter();
final lines = lineSplitter.convert(strBuffer.toString());
return ICalendar.fromLines(lines, allowEmptyLine: allowEmptyLine);
}