Flutter: Scheduled notification datetime

Hi guys,

I’m looking to integrate Flutter’s plugin date_time_picker with local notification.

So when I select a date&time I also schedule a notification.

Here’s my code…could you help me? Now I don’t have any error but code is not working.

Future scheuleAtParticularTime(DateTime timee) async {
var time = DateTime(timee.day, timee.month, timee.year, timee.hour,
timee.minute, timee.second);

var scheduledNotificationDateTime =
    new DateTime.now().add(new Duration(seconds: 5));
var androidPlatformChannelSpecifics = new AndroidNotificationDetails(
    'your other channel id',
    'your other channel name',
    'your other channel description');

var iOSPlatformChannelSpecifics = new IOSNotificationDetails();
NotificationDetails platformChannelSpecifics = new NotificationDetails(
android: androidPlatformChannelSpecifics,
iOS: iOSPlatformChannelSpecifics);

await fltrNotification.schedule(1, ‘scheduled title’, ‘scheduled body’,
scheduledNotificationDateTime, platformChannelSpecifics);
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
onPressed: () {
DatePicker.showDateTimePicker(context, showTitleActions: true,
onChanged: (date) {
print(‘change $date’);
}, onConfirm: (date) {
print(‘confirm $date’);
}, currentTime: DateTime.now(), locale: LocaleType.it);
child: Text(
‘Select time for notification arrival’,
TextStyle(color: Colors.black, fontWeight: FontWeight.w900),