I’m creating a birthday reminder app in flutter, I’ve done everything except setting schedule notification on the specific date of birth Enter by user

Viewed 490

I’ve implemented these things

  1. Databas.
  2. showing the records in list view
  3. There’s a add button to add user name, date of birth
  4. Local notification as well

Problem is ,how to setup notification reminder on the specific date enter by the user so that the app remind me the birthday of the person

1 Answers

I think you should try below easy dependency. https://pub.dev/packages/awesome_notifications

  String localTimeZone = await AwesomeNotifications().getLocalTimeZoneIdentifier();
  String utcTimeZone = await AwesomeNotifications().getLocalTimeZoneIdentifier();
  
  await AwesomeNotifications().createNotification(
      content: NotificationContent(
          id: id,
          channelKey: 'scheduled',
          title: 'Notification at every single minute',
          body:
              'This notification was schedule to repeat at every single minute.',
          notificationLayout: NotificationLayout.BigPicture,
          bigPicture: 'asset://assets/images/melted-clock.png'),
      schedule: NotificationInterval(interval: /*Your Interval in Seconds (60)*/, timeZone: localTimeZone, repeats: true));
Related