ical library

iCalendar (RFC 5545): read with each event's real zone (IANA TZIDs as they are, Windows names through CLDR's table, a custom VTIMEZONE matched to the IANA zone with the same offsets), written with VTIMEZONEs from the zones' real transitions (owner's decisions 14 and 16, 2026-11-08).

Classes

ICalCalendar
What a file says of itself.
ParsedICal

Functions

icalSource(String id, {String? url, Future<String> request(SourceHttpRequest request)?, FutureOr<String> text()?, Map<String, String> headers = const {}, EventInput? defaults, String? defaultZone, FutureOr<void> save(SaveRequest request)?, Duration? staleAfter, RetryPolicy? retry, Object? key}) → EventSourceSpec
An iCalendar feed as an event source: fetched whole (iCal has no ranges), read by parseICal; what reading it found wrong comes with the events. Given a url, the application's request fetches it (decision 55: its own client) and answers the text; or the text itself. A webcal:// link is the same feed over HTTPS.
parseICal(String text, {String? defaultZone}) → ParsedICal
Parses an iCalendar text into event inputs. Never throws on data: what is wrong is in problems, and an event whose start cannot be read is left out. Only VEVENTs are read. defaultZone: where floating times (no TZID, no Z) are read when the file names no zone (X-WR-TIMEZONE).
serializeICal(List<EventInput> inputs, {String prodId = '-//DzCalendar//EN', String? name, Instant? stamp, bool vtimezone = true}) → String
Writes inputs as an iCalendar text (CRLF, lines folded at 75 octets). Series keep their rules, EXDATEs and RDATEs; an override (seriesId + recurrenceId) is written under its series' UID with a RECURRENCE-ID.
windowsZone(String name) → String?
The IANA zone for a Windows zone name, case-insensitive.