UserProperties.fromJson constructor

UserProperties.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UserProperties.fromJson(Map<String, dynamic> json) {
  return UserProperties(
    birthDate: json['birth_date'] as String?,
    birthYear: json['birth_year'] as int?,
    bodyBoneMass: json['body_bone_mass'] as num?,
    bodyFat: json['body_fat'] as num?,
    bodyMassIndex: json['body_mass_index'] as num?,
    gender: json['gender'] == null ? null : Gender.fromString(json['gender'] as String),
    height: json['height'] as num?,
    timezone: json['timezone'] as String?,
    weight: json['weight'] as num?,
  );
}