toJson method

Map<String, dynamic> toJson()

Returns the data fields of AndroidNotificationOptions in JSON format.

Implementation

Map<String, dynamic> toJson() {
  return {
    'notificationId': id,
    'notificationChannelId': channelId,
    'notificationChannelName': channelName,
    'notificationChannelDescription': channelDescription,
    'notificationChannelImportance': channelImportance.rawValue,
    'notificationPriority': priority.rawValue,
    'enableVibration': enableVibration,
    'playSound': playSound,
    'showWhen': showWhen,
    'isSticky': isSticky,
    'visibility': visibility.rawValue,
    'iconData': iconData?.toJson(),
    'buttons': buttons?.map((e) => e.toJson()).toList(),
  };
}