Skip to content

A lightweight and intuitive observer pattern manager for Dart/Flutter in the style of the iOS Notification Center

License

Notifications You must be signed in to change notification settings

huongnguyenvan/dart_notification_center

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pub

A lightweight and intuitive observer pattern manager for Dart/Flutter in the style of the iOS Notification Center

Installation

To use this plugin, add dart_notification_center as a dependency in your pubspec.yaml file.

Import the package using:

import 'package:dart_notification_center/dart_notification_center.dart';

Usage

A simple example:

...

FlutterNotificationCenter.subscribe(
  channel: 'examples',
  observer: this,
  onNotification: (options) {
    print('Notified: ${options}');
  },
);

FlutterNotificationCenter.post(channel: 'examples', options: 'Congrats you did it!');

FlutterNotificationCenter.unsubscribe(channel: 'examples', observer: this);

...

About

A lightweight and intuitive observer pattern manager for Dart/Flutter in the style of the iOS Notification Center

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%