I'm trying to make an application. I want to add events to local calendar. But I don't know how to do that. It would be better if there were some simple examples.
Asked
Active
Viewed 3,640 times
1 Answers
2
You can use the plugin add_2_calendar.
Installation :
In your pubspec.yaml
file within your Flutter Project:
dependencies:
add_2_calendar: ^1.3.0
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>
Usage :
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);
...
See also Flutter documentation for using packages. You can look for packages on pub.dev when you need to use device APIs.

Augustin R
- 7,089
- 3
- 26
- 54
-
1Hey hi this does not support adding multiple event at a time, any reference for that. – Sagar Acharya Sep 01 '21 at 07:04
-
1
-
There is any ways to open "add calendar events" of local calendar with filled parameters instead of implementation of UI for it's fields? – M Karimi Feb 23 '22 at 08:15
-
-