Laminate3DPropertiesInput.fromJson constructor
Laminate3DPropertiesInput.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Laminate3DPropertiesInput.fromJson(Map<String, dynamic> json) {
return Laminate3DPropertiesInput(
analysisType: AnalysisType.values.firstWhere(
(e) =>
e.toString() ==
'AnalysisType.' + (json['analysis_type'] ?? "elastic"),
orElse: () => AnalysisType.elastic, // Default value if not found
),
E1: (json['E1'] ?? 0).toDouble(),
E2: (json['E2'] ?? 0).toDouble(),
G12: (json['G12'] ?? 0).toDouble(),
nu12: (json['nu12'] ?? 0).toDouble(),
nu23: (json['nu23'] ?? 0).toDouble(),
layupSequence: (json['layup_sequence'] ?? "").toString(),
layerThickness: (json['layer_thickness'] ?? 0).toDouble(),
alpha11: (json['alpha11'] ?? 0).toDouble(),
alpha22: (json['alpha22'] ?? 0).toDouble(),
alpha12: (json['alpha12'] ?? 0).toDouble(),
);
}