How can I schedule a monthly or weekly notification in flutter? The purpose is for it to act as a reminder for the user about something...
here is my code
void showMonthlyAtDayTime() async {
//var scheduledNotificationDateTime = DateTime.now().add(Duration(seconds: 10));
var time = Time(12, 6, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails(
'alarm_notif',
'Scheduled notification', // name of the notif channel
'A scheduled notification', // description of the notif channel
icon: 'question',
largeIcon: DrawableResourceAndroidBitmap('question'),
);
var iOSPlatformChannelSpecifics = IOSNotificationDetails(
presentAlert: true,
presentBadge: true,
presentSound: true);
var platformChannelSpecifics = NotificationDetails(
android: androidPlatformChannelSpecifics,
iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.showMonthlyAtDayTime(
0,
'Title',
'Body',
Day.Tuesday,
time,
platformChannelSpecifics);
}
The code has (red) underline beneath the showMonthlyAtDayTime in the
'wait flutterLocalNotificationsPlugin.showMonthlyAtDayTime' line
and the 'Day.Tuesday' line...
How should I modify the above code? so that the user will get notification once per each month of every year about something.