custom_notification_scheduler 0.0.1
custom_notification_scheduler: ^0.0.1 copied to clipboard
A plugin to schedule custom local notifications on Android and iOS.
π custom_notification_scheduler A powerful Flutter plugin to schedule custom local notifications on Android and iOS, with support for:
`β° Scheduled delivery
π Repeat intervals
π Custom sounds
π¦ Payload support for deep-link or custom logic`
Ideal for task reminders, daily habits, alarms, or calendar events.
π Features β Schedule notifications for a specific DateTime β Supports custom notification sounds (from assets) β Attach payload data for navigation or logic β Supports daily, weekly, and custom repeat intervals β Cancel individual or all scheduled notifications β Android and iOS support
π¦ Installation Add the plugin to your pubspec.yaml:
dependencies:
custom_notification_scheduler: ^0.0.1
Then run:
flutter pub get
π οΈ Platform Setup βΆοΈ Android Add your custom sound file (e.g. custom_sound.mp3) in:
android/app/src/main/res/raw/
Ensure your app has the correct permission to post notifications (for Android 13+):
<!-- AndroidManifest.xml -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
π iOS Add your sound file (e.g. custom_sound.mp3) to:
ios/Runner/Resources/
Enable notifications in Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
π Usage β° Schedule a Notification
import 'package:custom_notification_scheduler/custom_notification_scheduler.dart';
void scheduleNotification() {
CustomNotificationScheduler.scheduleNotification(
title: "Reminder",
body: "Time to take action!",
scheduledTime: DateTime.now().add(Duration(minutes: 5)),
sound: "custom_sound.mp3", // Optional: must exist in res/raw or iOS bundle
payload: {"id": 1}, // Optional: useful for navigation or logic
repeatInterval: RepeatInterval.daily, // Optional: daily, weekly, etc.
);
}
β Cancel All Notifications
void cancelNotifications() {
CustomNotificationScheduler.cancelAllNotifications();
}
π‘ Why Use This Plugin? β Simplified API: Easy to use with just one method call
β Cross-platform: Works consistently across Android and iOS
β Customizable: Supports your appβs tone with custom sounds and payloads
β Lightweight: Minimal dependency footprint
β Ideal for reminders: Health, task, medication, or productivity apps
π Coming Soon Schedule by notification ID
Cancel by ID
Callback support when notification is tapped
π€ Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
π License MIT Β© 2025 zihadsikder.vercel.app