long_time_no_notification 0.0.2 icon indicating copy to clipboard operation
long_time_no_notification: ^0.0.2 copied to clipboard

A package for easy management of showing and hiding notifications once closed!

long_time_no_notification #

A package for easy management of showing and hiding notifications once closed!

Motivation #

We wanted to be able to easily manage showing and hiding notifications on the client side only.

Usage #

// not Display forever once closed
LongTimeNoNotification.setForever(id: 'id_1');

// not show up until 7 days have passed
LongTimeNoNotification.setDuration(id: 'id_2', duration: const Duration(days: 7);

// find data by id
final notification = await LongTimeNoNotification.findBy('id_3');

// should it be displayed or not
notification.shouldNotify();

Notes #

  • Do not duplicate IDs.
  • IDs for notifications are stored in SharedPreferences, so please do not pass secure strings as IDs.
4
likes
140
pub points
0%
popularity

Publisher

verified publisher iconokaryo.io

A package for easy management of showing and hiding notifications once closed!

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, shared_preferences

More

Packages that depend on long_time_no_notification