toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (token != null) "token": token,
      if (topic != null) "topic": topic,
      if (condition != null) "condition": condition,
      if (notification != null) "notification": notification?.toJson(),
      if (data != null) "data": data,
      if (android != null) "android": android?.toJson(),
      if (apns != null) "apns": apns?.toJson(),
      if (webpush != null) "webpush": webpush?.toJson(),
    };