Height.fromJson constructor

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

Implementation

Height.fromJson(Map<String, dynamic> json) {
  _meters = json['meters'] ?? 0; // Default to 0 if meters is missing
  _feet = json['feet'] ?? 0; // Default to 0 if feet is missing
}