Search packages, repositories and app categories

Package detailsv2.2.0

manage_calendar_events

A flutter plugin which will help you to add, edit and remove the events (with reminders) from your (Android and ios) calendars

AndroidiOS
30-day downloads
209
Likes
46
Pub points
150

Install package

flutter pub add manage_calendar_events

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter plugin that enables seamless management of calendar events on Android and iOS devices. It allows users to add, edit, and remove events with customizable reminders. The package provides a straightforward API for integrating calendar functionality into apps, making it ideal for scheduling, task management, or reminder-based applications. It supports both platforms and leverages native calendar APIs for reliable performance.

Use cases

  • Scheduling appointments
  • Creating task reminders
  • Building event planning apps
  • Integrating with productivity tools
  • Managing recurring events

Key features

  • Add, edit, and delete calendar events
  • Support for event reminders
  • Cross-platform (Android & iOS)
  • Simple and intuitive API
  • Native calendar integration

Suitable for

  • Productivity apps
  • Appointment schedulers
  • Task management tools
  • Reminder-based applications
  • Event-driven workflows

Considerations

  • Requires user permission to access calendars
  • Limited to Android and iOS platforms
  • May require handling platform-specific error cases
  • Permissions must be requested at runtime
  • Event data may vary slightly between platforms

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

manage_calendar_events

pub package pub points pub likes License: MIT

A Flutter plugin for reading, creating, updating, and deleting device calendar events — with reminders and attendees — on Android and iOS.

Platform support

Android iOS
✓ ✓

Features

  • List all calendars available on the device, including whether each one is read-only or local
  • Create and delete local (non-synced) calendars
  • Read events from a calendar — all events, a date range, or a whole week/month
  • Create and update events: title, description, location, URL, all-day flag, and a reminder
  • Delete events
  • Add, update, and delete reminders on an existing event
  • Add, list, and remove attendees on an event

Getting started

1. Add the dependency
dependencies:
  manage_calendar_events: ^2.1.2
2. Android setup

Add the calendar permissions to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
3. iOS setup

Add the calendar usage description(s) to ios/Runner/Info.plist:

<key>NSCalendarsUsageDescription</key>
<string>This app needs calendar access to manage your events.</string>
<key>NSCalendarsFullAccessUsageDescription</key>
<string>This app needs calendar access to manage your events.</string>

NSCalendarsFullAccessUsageDescription is required on iOS 17+; NSCalendarsUsageDescription covers earlier versions.

Usage

import 'package:manage_calendar_events/manage_calendar_events.dart';

final _calendarPlugin = CalendarPlugin();
Request permissions
final granted = await _calendarPlugin.hasPermissions() ?? false;
if (!granted) {
  await _calendarPlugin.requestPermissions();
}
List calendars
final calendars = await _calendarPlugin.getCalendars();
final calendar = calendars!.first;
Create or delete a local calendar
final calendarId = await _calendarPlugin.createCalendar(
  calendarName: 'My App Calendar',
  color: Colors.blue,
);

// Only ever succeeds for a calendar created this way - it can't delete a
// user's real synced Google/iCloud calendar.
await _calendarPlugin.deleteCalendar(calendarId: calendarId!);
Read events
// Every event on a calendar
final events = await _calendarPlugin.getEvents(calendarId: calendar.id!);

// Events in an explicit date range
final events = await _calendarPlugin.getEventsByDateRange(
  calendarId: calendar.id!,
  startDate: DateTime.now(),
  endDate: DateTime.now().add(const Duration(days: 30)),
);

// Shortcuts for the current week / month
final weekEvents = await _calendarPlugin.getEventsByWeek(
  calendarId: calendar.id!,
  findDate: DateTime.now(),
);
final monthEvents = await _calendarPlugin.getEventsByMonth(
  calendarId: calendar.id!,
  findDate: DateTime.now(),
);
Create an event
final event = CalendarEvent(
  title: 'Team standup',
  description: 'Daily sync',
  startDate: DateTime.now(),
  endDate: DateTime.now().add(const Duration(hours: 1)),
  reminder: Reminder(minutes: 15), // remind 15 minutes before the event
);

final eventId = await _calendarPlugin.createEvent(
  calendarId: calendar.id!,
  event: event,
);
Update or delete an event
event
  ..eventId = eventId
  ..title = 'Team standup (moved)';
await _calendarPlugin.updateEvent(calendarId: calendar.id!, event: event);

await _calendarPlugin.deleteEvent(calendarId: calendar.id!, eventId: eventId!);
Reminders
await _calendarPlugin.addReminder(
  calendarId: calendar.id!,
  eventId: eventId!,
  minutes: 30,
);
await _calendarPlugin.updateReminder(
  calendarId: calendar.id!,
  eventId: eventId!,
  minutes: 10,
);
await _calendarPlugin.deleteReminder(eventId: eventId!);
Attendees
await _calendarPlugin.addAttendees(
  eventId: eventId!,
  newAttendees: [
    Attendee(name: 'Jane Doe', emailAddress: 'jane@example.com'),
  ],
);

final attendees = await _calendarPlugin.getAttendees(eventId: eventId!);

A full working app that exercises the whole API is in example/.

Contributing

Issues and pull requests are welcome on GitHub.

Author

Maintained by Lakshmanaprabhu R.

License

MIT — see LICENSE.

Categories

Source repository

Projects using this package

No data available yet.