serralvo / schedule_notifications

A Flutter plugin πŸ›  to schedule Local Notifications. Ready for iOS and Android πŸš€

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Schedule Notifications

A Flutter plugin πŸ›  to schedule Local Notifications. Ready for iOS and Android πŸš€

License

Features

  • Send local notifications to iOS and Android πŸ“’
  • Schedule notifications ⏰

Requirements

  • iOS: Version 10.0+
  • Android: minSdkVersion 16

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  schedule_notifications: "^0.1.8"

Usage example

General

  • 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();

Android

  • 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);

iOS

  • To request authorization of user:
ScheduleNotifications.requestAuthorization();

Contribute

We would ❀️ to see your contribution!

License

Distributed under the MIT license. See LICENSE for more information.

About

Created by Fabricio Serralvo and Marcos Aoki.

About

A Flutter plugin πŸ›  to schedule Local Notifications. Ready for iOS and Android πŸš€

License:Other


Languages

Language:Java 52.5%Language:Dart 18.8%Language:Objective-C 17.6%Language:Ruby 9.9%Language:Swift 1.2%