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.
Libraries
- dart_icalendar
- models/alarm_model
- models/attachment_model
- models/event_model
- models/extensions/datetime_extension
- models/extensions/duration_extension
- models/extensions/extensions.models.export
- models/extensions/recurrence_extension
- models/free_busy_model
- models/icalendar_model
- models/journal_model
- models/location_model
- models/models.export
- models/person_model
- models/recurrence_model
- models/status_model
- models/time_zone_model
- models/todo_model
- models/x_date_model