# scheduleNotification method

Future scheduleNotification ()

Schedules notification

## Implementation

    scheduleNotification() async {
      if (parent.nm != null) {
        FlutterLocalNotificationsPlugin plugin =
            FlutterLocalNotificationsPlugin();
        const AndroidInitializationSettings initializationSettingsAndroid =
            AndroidInitializationSettings('ic_launcher');
        final IOSInitializationSettings initializationSettingsIOS =
            IOSInitializationSettings(
                onDidReceiveLocalNotification: onDidReceiveLocalNotification);
        final MacOSInitializationSettings initializationSettingsMacOS =
            MacOSInitializationSettings();
        final InitializationSettings initializationSettings =
            InitializationSettings(
                android: initializationSettingsAndroid,
                iOS: initializationSettingsIOS,
                macOS: initializationSettingsMacOS);
        await plugin.initialize(initializationSettings,
            onSelectNotification: selectNotification);
        if (getTime().isAfter(DateTime.now())) {
          print("scheduled to:" + parent.notificationModel.date1);
          await plugin.zonedSchedule(
              parent.notificationModel.note,
              parent.nm.getTitleFromModel(16),
              parent.nm.getShortDesc(24),
              getTime(),
              const NotificationDetails(
                  android: AndroidNotificationDetails('your channel id',
                      'Notifications', 'Channel for your alarms')),
              androidAllowWhileIdle: true,
              uiLocalNotificationDateInterpretation:
                  UILocalNotificationDateInterpretation.absoluteTime);
        }
      }
    }