ical

Last updated:

0 purchases

ical Image
ical Images
Add to Cart

Description:

ical

ical #
Dart package to generate iCalendar files.
https://en.wikipedia.org/wiki/ICalendar
Example #
import 'package:ical/serializer.dart';
import 'dart:io';

main() async {
ICalendar cal = ICalendar();
cal.addElement(
IEvent(
uid: '[email protected]',
start: DateTime(2019, 3, 6),
url: 'https://pub.dartlang.org/packages/srt_parser',
status: IEventStatus.CONFIRMED,
location: 'Heilbronn',
description:
'Arman and Adrian released their SRT-file parser library for Dart',
summary: 'SRT-file Parser Release',
rrule: IRecurrenceRule(frequency: IRecurrenceFrequency.YEARLY),
),
);
cal.addElement(
IEvent(
alarm: IAlarm.audio(
duration: Duration(minutes: 3),
repeat: 1,
trigger: DateTime(2019, 4, 2, 11),
),
description: 'Lukas releases his iCal-feed serializer',
summary: 'ical Release',
start: DateTime(2019, 4, 2, 11, 15),
end: DateTime(2019, 4, 2, 11, 30),
uid: '[email protected]',
organizer: IOrganizer(email: '[email protected]', name: 'Lukas Himsel'),
lat: 49.6782872,
lng: 10.2425528,
),
);

await HttpServer.bind(InternetAddress.loopbackIPv4, 8080)
..listen((HttpRequest request) {
request.response
..headers.contentType = ContentType('text', 'calendar')
..write(cal.serialize())
..close();
});
print('server running http://localhost:8080');
}
copied to clipboard
Full example in ./example
Implemented Features #

✅ Basic Calendar Object
✅ Event Element
✅ To-Do Element
✅ Journal Element
✅ Alarm Component
❌ Free/Busy Times
❌ Timezones
❌ Attachements (for Emails, Sound-Alarms, etc.)
✅ Recurrence of Elements with RRULE
❌ EXDATE
✅ STATUS
❌ ATTENDEE, [ ] CONTACT, [x] ORGANIZER Link

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.