zeba_academy_notification_scheduler 0.0.1
zeba_academy_notification_scheduler: ^0.0.1 copied to clipboard
Offline notification scheduler with repeat, grouping & customization
๐ฆ zeba_academy_notification_scheduler #
A powerful, lightweight Flutter package for offline local notification scheduling with support for repeating alerts, customization, and easy integration.
๐ Features #
- ๐ Offline local notifications (no internet required)
- โฐ Schedule one-time or repeating notifications
- ๐ Daily & weekly repeating support
- ๐จ Custom icons, sounds, and vibration patterns
- ๐ Notification grouping & priority control
- โก Simple and clean API for fast integration
- ๐ง Timezone-aware scheduling
๐ฆ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_notification_scheduler: ^0.0.1
Then run:
flutter pub get
โ๏ธ Setup #
๐น Initialize Notifications #
await ZebaNotificationService.init();
await TimezoneHelper.init();
๐งช Basic Usage #
๐น Create Notification #
final notification = ZebaNotification(
id: 1,
title: "Reminder",
body: "Time to study Flutter!",
scheduledTime: DateTime.now().add(Duration(seconds: 10)),
);
๐น Schedule Notification #
await ZebaScheduler.schedule(notification);
๐ Repeating Notifications #
โ Daily #
final notification = ZebaNotification(
id: 2,
title: "Daily Reminder",
body: "Stay consistent!",
scheduledTime: DateTime.now().add(Duration(seconds: 10)),
repeatDaily: true,
);
โ Weekly #
final notification = ZebaNotification(
id: 3,
title: "Weekly Reminder",
body: "Weekly check-in!",
scheduledTime: DateTime.now().add(Duration(seconds: 10)),
repeatWeekly: true,
);
โ Cancel Notifications #
Cancel one #
await ZebaScheduler.cancel(1);
Cancel all #
await ZebaScheduler.cancelAll();
๐จ Advanced Customization #
๐ Custom Sound #
AndroidNotificationDetails(
'zeba_channel',
'Zeba Notifications',
sound: RawResourceAndroidNotificationSound('custom_sound'),
);
๐ณ Vibration Pattern #
vibrationPattern: Int64List.fromList([0, 1000, 500, 1000]),
๐ฆ Group Notifications #
groupKey: 'zeba_group',
๐ฑ Platform Setup #
๐ค Android #
Add permissions in AndroidManifest.xml:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
๐ iOS #
Enable notification permissions in AppDelegate.swift:
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .badge, .sound],
completionHandler: { _, _ in }
)
๐ง Important Notes #
- Always initialize timezone before scheduling
- Use unique notification IDs
- Scheduled notifications persist after app restart (Android)
- Works completely offline
๐ฏ Use Cases #
- ๐ Reminder apps
- โฐ Alarm systems
- ๐ข Offline alert systems
- ๐ Study planners
- ๐ผ Productivity tools
๐งช Testing #
Make sure to initialize timezone in tests:
setUpAll(() {
tz.initializeTimeZones();
});
๐ค Contributing #
Contributions are welcome! Feel free to open issues or submit pull requests to improve this package.
๐ License #
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
๐จโ๐ป About Me #
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn
๐ Your all-in-one no-bloat hub! #
๐ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy.
Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐ปโจ
Zeba Academy is a learning platform dedicated to coding, technology, and development.
โก Visit our main site: https://zeba.academy โก Explore courses: https://code.zeba.academy โก YouTube: https://www.youtube.com/@zeba.academy โก Instagram: https://www.instagram.com/zeba.academy/
Thank you for visiting! โค๏ธ