toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (priority != null) "priority": priority?.name,
      if (secondsToShow != null) "ttl": "${secondsToShow}s",
      if (notification != null) "notification": notification?.toJson(),
      if (fcmOptions != null) "fcm_options": fcmOptions?.toJson(),
    };