SecondStage.fromJson constructor
SecondStage.fromJson(
- Map<String, dynamic> json
)
Implementation
SecondStage.fromJson(Map<String, dynamic> json) {
thrust = json['thrust'] != null
? ThrustSeaLevel.fromJson(json['thrust'])
: ThrustSeaLevel(
kN: 0, lbf: 0); // Provide default values for 'kN' and 'lbf'
payloads = json['payloads'] != null
? Payloads.fromJson(json['payloads'])
: Payloads(); // You can change the default value accordingly.
reusable = json['reusable'] ??
false; // You can change the default value accordingly.
engines =
json['engines'] ?? 0; // You can change the default value accordingly.
fuelAmountTons = json['fuel_amount_tons'] ??
0; // You can change the default value accordingly.
burnTimeSec = json['burn_time_sec'] ??
0; // You can change the default value accordingly.
}