class EvaluatedCurrencyModel { String pcrCurrcode = ""; double sgtGntramtfc = 0.0; double serviceCharges = 0.0; double targetPerEratrateact = 0.0; EvaluatedCurrencyModel({ this.pcrCurrcode = "", this.sgtGntramtfc = 0.0, this.serviceCharges = 0.0, this.targetPerEratrateact = 0.0, }); EvaluatedCurrencyModel.empty() : this.pcrCurrcode = "", this.sgtGntramtfc = 0.0, this.serviceCharges = 0.0, this.targetPerEratrateact = 0.0; Map toMap() { return { 'pcrCurrcode': this.pcrCurrcode, 'sgtGntramtfc': this.sgtGntramtfc, 'serviceCharges': this.serviceCharges, 'targetPerEratrateact': this.targetPerEratrateact, }; } factory EvaluatedCurrencyModel.fromMap(Map map) { return EvaluatedCurrencyModel( pcrCurrcode: map['pcrCurrcode'] ?? "", sgtGntramtfc: map['sgtGntramtfc'] ?? 0.0, serviceCharges: map['serviceCharges'] ?? 0.0, targetPerEratrateact: map['targetPerEratrateact'] ?? 0.0, ); } @override String toString() { return 'EvaluatedCurrencyModel{pcrCurrcode: $pcrCurrcode, sgtGntramtfc: $sgtGntramtfc, serviceCharges: $serviceCharges, targetPerEratrateact: $targetPerEratrateact}'; } // Factory constructor to create an instance from a JSON map // factory EvaluatedCurrencyModel.fromJson(Map json) { // return EvaluatedCurrencyModel( // pcrCurrcode: json['pcrCurrcode'] as String, // sgtGntramtfc: (json['sgtGntramtfc'] as num).toDouble(), // serviceCharges: (json['serviceCharges'] as num).toDouble(), // targetPerEratrateact: (json['targetPerEratrateact'] as num).toDouble(), // ); // } // // // Method to convert an instance to a JSON map // Map toJson() { // return { // 'pcrCurrcode': pcrCurrcode, // 'sgtGntramtfc': sgtGntramtfc, // 'serviceCharges': serviceCharges, // 'targetPerEratrateact': targetPerEratrateact, // }; // } }