serralvo / scheduled_notifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scheduled_notifications

A flutter plugin for scheduling notifications on Android.

Usage

To use this plugin, add scheduled_notifications as a dependency in your pubspec.yaml file. Note you have to specify minSdkVersion on 23 in your AndroidManifest.xml to use this plugin.

Example

import 'package:scheduled_notifications/scheduled_notifications.dart';

void main() {
  runApp(new Scaffold(
    body: new Center(
      child: new RaisedButton(
        onPressed: _scheduleNotification,
        child: new Text('Schedule notification in 5 seconds'),
      ),
    ),
  ));
}

_scheduleNotification() async {
      int notificationId = await ScheduledNotifications.scheduleNotification(
          new DateTime.now().add(new Duration(seconds: 5)).millisecondsSinceEpoch,
          "Ticker text",
          "Content title",
          "Content");
}

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Java 66.3%Language:Dart 16.9%Language:Ruby 8.6%Language:Objective-C 8.3%