createScheduleNotification method

Future<void> createScheduleNotification()

Implementation

Future<void> createScheduleNotification() async {
  try {
    await awesomeNotifications.createNotification(
      schedule: NotificationCalendar(
        day: DateTime.now().day,
        month: DateTime.now().month,
        year: DateTime.now().year,
        hour: DateTime.now().hour,
        minute: DateTime.now().minute + 1,
      ),
      content: NotificationContent(
        id: -1,
        channelKey: 'basic_channel',
        title: 'Start Sale In Just Two Min Ago',
        body: "Hurry Sale Is Now Live Grab The Loot",
        bigPicture:
            'https://rukminim2.flixcart.com/image/612/612/xif0q/sweatshirt/p/i/p/m-839-3-ftx-original-imagvbmpzzreycyg.jpeg?q=70',
        notificationLayout: NotificationLayout.BigPicture,
      ),
    );
  // ignore: empty_catches
  } catch (e) {}
}