I developed app using flutter. I want to develop push notification setting screen. User can set push notification time using this page. And It is daily noti to user at user's setting time.

This is my flutter code, but nothing happening! Please help me what I modified the code.

  Future _showNotificationWithSound() async {
    var androidPlatformChannelSpecifics = AndroidNotificationDetails(
        'your channel id', 'your channel name', 'your channel description',
        importance: Importance.Max, priority: Priority.High);

    var iosPlatformChannelSpecifics = IOSNotificationDetails();
    var platformChannelSpecifics = NotificationDetails(androidPlatformChannelSpecifics, iosPlatformChannelSpecifics);

    await _flutterLocalNotificationsPlugin.show(
      1,
      'Title',
      'Contents! :)',
      platformChannelSpecifics,
    );
  }


Solution 1: Ali Hussein Al-Issa

As the Plugin's readme states, you can schedule a daily notification using showDailyAtTime method rather than using show method:

var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics =
AndroidNotificationDetails('repeatDailyAtTime channel id',
    'repeatDailyAtTime channel name', 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics =
    IOSNotificationDetails();
var platformChannelSpecifics = NotificationDetails(
    androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.showDailyAtTime(
    0,
    'show daily title',
    'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
    time,
    platformChannelSpecifics
);