Skip to content

A really simple Flutter plugin to add events to each platform's default calendar..

License

Notifications You must be signed in to change notification settings

palmsnipe/add_2_calendar

 
 

Repository files navigation

add_2_calendar

A really simple Flutter plugin to add events to each platform's default calendar.

Installation

In your pubspec.yaml file within your Flutter Project:

dependencies:
  add_2_calendar: ^1.3.1

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>
<key>NSContactsUsageDescription</key>
<string>INSERT_REASON_HERE</string>

Use it

import 'package:add_2_calendar/add_2_calendar.dart';

final Event event = Event(
      title: 'Event title',
      description: 'Event description',
      location: 'Event location',
      startDate: DateTime(/* Some date here */),
      endDate: DateTime(/* Some date here */),
    );
...
Add2Calendar.addEvent2Cal(event);
...

Note: See DateTime docs to know what valid date could be correct in above piece of code.

Example

Please run the app in the example/ folder to start playing!

About

A really simple Flutter plugin to add events to each platform's default calendar..

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 32.5%
  • Ruby 29.1%
  • Java 18.2%
  • Dart 14.3%
  • Shell 3.6%
  • Objective-C 2.3%