flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

[flutter_local_notifications] Add custom repeat interval - periodicallyShowWithDuration method

Open mateuszluczak1996 opened this issue 1 year ago • 1 comments

Add an option to set custom time for periodically showed notifications.

The problem that I have encountered on iOS devices is that repeating interval must be set to 60 seconds minimum, but I don't think that is the problem for real use case scenarios.

Sample usage:

    await flutterLocalNotificationsPlugin.periodicallyShowWithDuration(
      1,
      'repeating period title',
      'repeating period body',
      const Duration(minutes: 5),
      androidScheduleMode: AndroidScheduleMode.exactAllowWhileIdle,
    );

mateuszluczak1996 avatar Jan 01 '24 19:01 mateuszluczak1996

Thanks for the PR. Will need time to give this one a good review compared to some other ones

MaikuB avatar Jan 17 '24 10:01 MaikuB

In the interest of merging the PR, I've made the changes and will have this merged in soon :)

MaikuB avatar Jun 28 '24 02:06 MaikuB

Great addition!!

Only thing I want further is to specify initial time (currently it defaults to current time). But i guess it is limited by iOS side capability.

yfujiki avatar Jun 28 '24 06:06 yfujiki

Looks great!! About what @yfujiki said, can the offset datetime (say something like the zonedSchedule) be used in tandem with the periodic duration? It might be able to solve multiple scheduling scenarios.

pandey407 avatar Jul 03 '24 12:07 pandey407