Last updated:
0 purchases
enough icalendar export
enough_icalendar_export #
Allows to exports a VCalendar event to the native calendar
Installation #
Add this dependency your pubspec.yaml file:
dependencies:
enough_icalendar_export: ^0.3.0
copied to clipboard
The latest version or enough_icalendar_export is .
Usage #
After importing package:enough_icalendar_export/enough_icalendar_export.dart' you can use the exportToNativeCalendar() extension method
or the VCalendarExporter.export(icalendar) method, in case you don't like to use extension methods.
The method will return a Future<bool> value with true when everything worked as expected.
import 'package:enough_icalendar/enough_icalendar.dart';
import 'package:enough_icalendar_export/enough_icalendar_export.dart';
void main() async {
final text = '''BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:19970714T170000Z
ORGANIZER;CN=John Doe:MAILTO:[email protected]
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
RRULE:FREQ=YEARLY
SUMMARY:Bastille Day Party
LOCATION:Somewhere in Bastille
END:VEVENT
END:VCALENDAR''';
final icalendar = VComponent.parse(text) as VCalendar;
final success = await icalendar.exportToNativeCalendar();
if (success) {
print('event exported :-)');
}
}
copied to clipboard
iOS integration #
In order to make this plugin work on iOS 10+, be sure to add this to your info.plist file:
<key>NSCalendarsUsageDescription</key>
<string>INSERT_REASON_HERE</string>
copied to clipboard
API Documentation #
Check out the full API documentation at https://pub.dev/documentation/enough_icalendar_export/latest/
Related Projects #
Use enough_icalendar to parse and generate iCalendar objects
Check out enough_mail_icalendar for handling calendar invites in emails
License #
enough_icalendar_export is licensed under the commercial friendly Mozilla Public License 2.0
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.