createSimpleNotification method

  1. @override
Future<bool> createSimpleNotification({
  1. required String title,
  2. required String text,
})
override

Implementation

@override
Future<bool> createSimpleNotification({
  required String title,
  required String text,
}) async {
  if (is_support_awesome_notification) {
    return await AwesomeNotifications().createNotification(
      content: NotificationContent(
        id: 10,
        channelKey: "basic_channel",
        actionType: ActionType.Default,
        title: title,
        body: text,
      ),
    );
  }
  if (is_support_desktop_notification) {
    return await super.createSimpleNotification(title: title, text: text);
  }
  return false;
}