device_calendar
4.3.3, released 2 years ago by builttoroam.com
Flutter plugin to read, create, update, and delete calendars and events on Android and iOS devices.
What it does
Provides APIs to request calendar permissions, list calendars, retrieve events, and manage events including attendees, reminders, and recurrence. Supports timezone-aware dates via the timezone package.
AI-written summary of version 4.3.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to interact with the native calendar on a user's device
- You want to add or edit events programmatically in Android or iOS
Skip it when
- You require cross‑platform calendar syncing with a backend service
- You need advanced UI calendar widgets (use a UI‑kit instead)
Strengths
- Full read/write access to device calendars
- Timezone support with TZDateTime
- Handles recurring events and attendees
Weaknesses
- Requires native setup (AndroidManifest, iOS Info.plist)
- Limited to device‑local data, no cloud sync
- Potential issues with Swift plugins in Objective‑C projects
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Add READ_CALENDAR and WRITE_CALENDAR permissions to AndroidManifest.xml; add NSCalendarsUsageDescription, NSContactsUsageDescription, and NSCalendarsFullAccessUsageDescription keys to iOS Info.plist; optionally add ProGuard rule '-keep class com.builttoroam.devicecalendar.** { *; }'; import 'package:timezone/timezone.dart' if using timezone features.
import 'package:device_calendar/device_calendar.dart';
final DeviceCalendarPlugin _deviceCalendarPlugin = DeviceCalendarPlugin();
Future<void> addEvent() async {
final calendarsResult = await _deviceCalendarPlugin.retrieveCalendars();
final calendar = calendarsResult?.data?.firstWhere((c) => c.isDefault ?? false);
if (calendar == null) return;
final event = Event(calendar.id, title: 'Meeting');
await _deviceCalendarPlugin.createOrUpdateEvent(event);
}Alternatives
Packages that do the same job and could replace device_calendar.
- location
Flutter plugin to get real-time device location across platforms.
94Compare - universal_ble
Cross-platform Bluetooth Low Energy (BLE) plugin for Flutter
92Compare - device_calendar_plus
Plugin for reading and writing device calendar events on Android and iOS.
83Compare - eventide
Access and modify native device calendars and events on iOS and Android.
79Compare
Works with
Packages commonly used together with device_calendar: ones it builds on, ones built on it, and its own family.