toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = {};

  if (userId != null) data['user_id'] = userId;
  if (gender != null) data['gender'] = gender;
  if (heightCm != null) data['height_cm'] = heightCm;
  if (weightKg != null) data['weight_kg'] = weightKg;
  if (bustCm != null) data['bust_cm'] = bustCm;
  if (waistCm != null) data['waist_cm'] = waistCm;
  if (hipsCm != null) data['hips_cm'] = hipsCm;
  if (fitPreference != null) data['fit_preference'] = fitPreference;
  if (stylePreferenceTags != null) data['style_preference_tags'] = stylePreferenceTags;
  if (colorPreferenceTags != null) data['color_preference_tags'] = colorPreferenceTags;
  if (avoidElements != null) data['avoid_elements'] = avoidElements;
  if (sceneTag != null) data['scene_tag'] = sceneTag;

  return data;
}