Diameter.fromJson constructor
Implementation
Diameter.fromJson(Map<String, dynamic> json) {
_meters =
json['meters'] ?? 0; // Initialize with default value if not provided
_feet = json['feet'] ?? 0; // Initialize with default value if not provided
}