dart_icalendar 1.1.1 copy "dart_icalendar: ^1.1.1" to clipboard
dart_icalendar: ^1.1.1 copied to clipboard

Package to serialize and deserialize iCalendar files

dart_icalendar #

dart_icalendar is a library for working with iCalendar files in Dart. It provides models for all iCalendar components, as well as extensions for common operations like date calculations and recurrence rules.

##This package is not finished yet and more testing needs to be done to ensure it works properly.

Usage To use dart_icalendar, add it to your dependencies in pubspec.yaml:

dependencies: dart_icalendar: ^1.0.13 Then import it in your Dart code:

import 'package:dart_icalendar/dart_icalendar.dart'; You can create and manipulate iCalendar objects using the provided models. For example, to create an event:

final event = Event( uid: '1234', summary: 'My Event', description: 'A description of my event', startDate: DateTime.now(), endDate: DateTime.now().add(Duration(hours: 1)), ); You can add the event to an iCalendar object:

final ical = ICalendar('myapp.com', events: [event]); You can then generate an iCalendar string from the object:

final icalString = ical.toICalString(); And you can parse an iCalendar string into an object:

final parsedIcal = ICalendar.fromICalString(icalString); Models The following models are provided:

Alarm Attachment Event FreeBusy ICalendar Journal Location Person RecurrenceRule Status Timezone Todo XDate Extensions The following extensions are provided:

DateTimeExtension DurationExtension RecurrenceExtension License dart_icalendar is released under the MIT License. See the LICENSE file for details.

1
likes
130
points
689
downloads

Publisher

verified publisherapollocode.ca

Weekly Downloads

Package to serialize and deserialize iCalendar files

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

collection, intl

More

Packages that depend on dart_icalendar