A Flutter plugin ๐ to schedule Local Notifications. Ready for iOS and Android ๐
- Send local notifications to iOS and Android ๐ข
- Schedule notifications โฐ
- iOS: Version 10.0+
- Android: minSdkVersion 16
Add this to your package's pubspec.yaml file:
dependencies:
schedule_notifications: "^0.1.8"
- One shot:
ScheduleNotifications.schedule("Notification Text", new DateTime.now(), []);
- Schedule notifications:
List daysToRepeat = [DateTime.sunday, DateTime.monday]; // repeat every sunday and monday
ScheduleNotifications.schedule("Notification Text", new DateTime.now(), daysToRepeat);
- Unschedule:
ScheduleNotifications.unschedule();
- To set icon of notifications:
int iconResourceId;
try {
iconResourceId = await _platform.invokeMethod('getIconResourceId');
} on PlatformException catch (e) {
ย ย print('Error on get icon resource id');
}
ScheduleNotifications.setNotificationIcon(iconResourceId);
- To request authorization of user:
ScheduleNotifications.requestAuthorization();
We would โค๏ธ to see your contribution!
Distributed under the MIT license. See LICENSE
for more information.
Created by Fabricio Serralvo and Marcos Aoki.