我尝试每 72 小时发送一次通知。我正在使用flutter_local_notifications包裹。我知道我可以定期显示通知,但据我所知,它仅限于以下选项:
/// The available intervals for periodically showing notifications.
enum RepeatInterval {
/// An interval for every minute.
everyMinute,
/// Hourly interval.
hourly,
/// Daily interval.
daily,
/// Weekly interval.
weekly
}
有什么办法可以达到72小时的间隔吗?我在这方面找不到任何东西。如果您需要更多信息,请告诉我!如有任何帮助,我们将不胜感激!
最佳答案
你可以试试这个:-
fltrNotification = new FlutterLocalNotificationsPlugin();
var scheduledTime = DateTime.now().add(Duration(hour : 72));
fltrNotification.schedule(1, "Times Uppp", task,
scheduledTime, generalNotificationDetails);
关于Flutter 本地通知每 72 小时显示一次通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70406218/