ScheduleNotifications constructor

ScheduleNotifications(
  1. String channelId,
  2. String channelName,
  3. String channelDescription, {
  4. String? appIcon,
  5. TZDateTime? schedule,
  6. String? title,
  7. String? body,
  8. String? payload,
  9. bool? androidAllowWhileIdle,
  10. String? icon,
  11. Importance? importance,
  12. Priority? priority,
  13. StyleInformation? styleInformation,
  14. bool? playSound,
  15. AndroidNotificationSound? sound,
  16. bool? enableVibration,
  17. List<int>? vibrationPattern,
  18. String? groupKey,
  19. bool? setAsGroupSummary,
  20. GroupAlertBehavior? groupAlertBehavior,
  21. bool? autoCancel,
  22. bool? ongoing,
  23. Color? color,
  24. AndroidBitmap<Object>? largeIcon,
  25. bool? onlyAlertOnce,
  26. bool? showWhen,
  27. bool? usesChronometer,
  28. bool? channelShowBadge,
  29. bool? showProgress,
  30. int? maxProgress,
  31. int? progress,
  32. bool? indeterminate,
  33. AndroidNotificationChannelAction? channelAction,
  34. bool? enableLights,
  35. Color? ledColor,
  36. int? ledOnMs,
  37. int? ledOffMs,
  38. String? ticker,
  39. NotificationVisibility? visibility,
  40. int? timeoutAfter,
  41. String? category,
  42. bool? fullScreenIntent,
  43. String? shortcutId,
  44. Int32List? additionalFlags,
  45. String? subText,
  46. String? tag,
  47. RepeatInterval? repeatInterval,
  48. Day? day,
  49. SelectNotificationCallback? onSelectNotification,
  50. bool? requestAlertPermission,
  51. bool? requestSoundPermission,
  52. bool? requestBadgePermission,
  53. bool? defaultPresentAlert,
  54. bool? defaultPresentSound,
  55. bool? defaultPresentBadge,
  56. DidReceiveLocalNotificationCallback? onDidReceiveLocalNotification,
  57. bool? presentAlert,
  58. bool? presentSound,
  59. bool? presentBadge,
  60. String? soundFile,
  61. int? badgeNumber,
  62. List<IOSNotificationAttachment>? attachments,
  63. String? subtitle,
  64. String? threadIdentifier,
})

Pass in all the possible settings for your App's Notificatoin feature.

Implementation

ScheduleNotifications(
  this.channelId,
  this.channelName,
  this.channelDescription, {
  String? appIcon,
  TZDateTime? schedule,
  String? title,
  String? body,
  String? payload,
  bool? androidAllowWhileIdle,
  String? icon,
  Importance? importance,
  Priority? priority,
  StyleInformation? styleInformation,
  bool? playSound,
  AndroidNotificationSound? sound,
  bool? enableVibration,
  List<int>? vibrationPattern,
  String? groupKey,
  bool? setAsGroupSummary,
  GroupAlertBehavior? groupAlertBehavior,
  bool? autoCancel,
  bool? ongoing,
  Color? color,
  AndroidBitmap<Object>? largeIcon,
  bool? onlyAlertOnce,
  bool? showWhen,
//    int? when,
  bool? usesChronometer,
  bool? channelShowBadge,
  bool? showProgress,
  int? maxProgress,
  int? progress,
  bool? indeterminate,
  AndroidNotificationChannelAction? channelAction,
  bool? enableLights,
  Color? ledColor,
  int? ledOnMs,
  int? ledOffMs,
  String? ticker,
  NotificationVisibility? visibility,
  int? timeoutAfter,
  String? category,
  bool? fullScreenIntent,
  String? shortcutId,
  Int32List? additionalFlags,
  String? subText,
  String? tag,
  RepeatInterval? repeatInterval,
  Day? day,
  SelectNotificationCallback? onSelectNotification,
  bool? requestAlertPermission,
  bool? requestSoundPermission,
  bool? requestBadgePermission,
  bool? defaultPresentAlert,
  bool? defaultPresentSound,
  bool? defaultPresentBadge,
  DidReceiveLocalNotificationCallback? onDidReceiveLocalNotification,
  bool? presentAlert,
  bool? presentSound,
  bool? presentBadge,
  String? soundFile,
  int? badgeNumber,
  List<IOSNotificationAttachment>? attachments,
  String? subtitle,
  String? threadIdentifier,
}) {
  if (appIcon == null || appIcon.trim().isEmpty) {
    // Assign the app's icon.
    _appIcon = '@mipmap/ic_launcher';
  } else {
    _appIcon = appIcon.trim();
  }
  // Take in parameter values into private variables.
  _schedule = schedule;
  _title = title ?? '';
  _body = body ?? '';
  _payload = payload;
  _androidAllowWhileIdle = androidAllowWhileIdle ?? false;
  _icon = icon;
  _importance = importance ?? Importance.defaultImportance;
  _priority = priority ?? Priority.defaultPriority;
  _styleInformation = styleInformation;
  _playSound = playSound; // ?? false;
  _sound = sound;
  _enableVibration = enableVibration ?? false;
  _vibrationPattern = vibrationPattern;
  _groupKey = groupKey;
  _setAsGroupSummary = setAsGroupSummary ?? false;
  _groupAlertBehavior = groupAlertBehavior ?? GroupAlertBehavior.all;
  _autoCancel = autoCancel ?? true;
  _ongoing = ongoing ?? false;
  _color = color;
  _largeIcon = largeIcon;
  _onlyAlertOnce = onlyAlertOnce ?? false;
  _showWhen = showWhen ?? true;
//    _when =
  _usesChronometer = usesChronometer ?? false;
  _channelShowBadge = channelShowBadge ?? true;
  _showProgress = showProgress ?? false;
  _maxProgress = maxProgress ?? 0;
  _progress = progress ?? 0;
  _indeterminate = indeterminate ?? false;
  _channelAction =
      channelAction ?? AndroidNotificationChannelAction.createIfNotExists;
  _enableLights = enableLights ?? true;
  _ledColor = ledColor ?? const Color.fromARGB(255, 255, 0, 0);
  _ledOnMs = ledOnMs ?? 1000;
  _ledOffMs = ledOffMs ?? 500;
  _ticker = ticker;
  _visibility = visibility ?? NotificationVisibility.private;
  _timeoutAfter = timeoutAfter;
  _category = category;
  _fullScreenIntent = fullScreenIntent ?? false;
  _shortcutId = shortcutId;
  _additionalFlags = additionalFlags;
  _subText = subText;
  _tag = tag;
  _repeatInterval = repeatInterval;
  _day = day;
  _selectNotificationCallback = onSelectNotification;
  _requestAlertPermission = requestAlertPermission ?? true;
  _requestSoundPermission = requestSoundPermission ?? true;
  _requestBadgePermission = requestBadgePermission ?? true;
  _defaultPresentAlert = defaultPresentAlert ?? true;
  _defaultPresentSound = defaultPresentSound ?? true;
  _defaultPresentBadge = defaultPresentBadge ?? true;
  _onDidReceiveLocalNotification = onDidReceiveLocalNotification;
  _presentAlert = presentAlert ?? true;
  _presentSound = presentSound ?? true;
  _presentBadge = presentBadge ?? true;
  _soundFile = soundFile;
  _badgeNumber = badgeNumber;
  _attachments = attachments;
  _subtitle = subtitle;
  _threadIdentifier = threadIdentifier;
}