LaminaEngineeringConstantsInput.fromJson constructor
LaminaEngineeringConstantsInput.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LaminaEngineeringConstantsInput.fromJson(Map<String, dynamic> json) {
return LaminaEngineeringConstantsInput(
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(),
layupAngle: (json['layup_angle'] ?? 0).toDouble(),
alpha11: (json['alpha11'] ?? 0).toDouble(),
alpha22: (json['alpha22'] ?? 0).toDouble(),
alpha12: (json['alpha12'] ?? 0).toDouble(),
);
}