QuoteVersionsModel.fromJson constructor

QuoteVersionsModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory QuoteVersionsModel.fromJson(Map<String, dynamic> json) {
  return QuoteVersionsModel(
    calculations: json['calculations'] != null ? (json['calculations'] is String ? jsonDecode(json['calculations']) : json['calculations']) : {},
    createdAt: json['created_at'] != null ? DateTime.parse(json['created_at'].toString()) : null,
    id: json['id'],
    quoteId: json['quote_id'] ?? '',
  );
}