HeaderModel.fromJson constructor

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

Implementation

factory HeaderModel.fromJson(Map<String, dynamic> json) {
  return HeaderModel(
    json['id'],
    json['version'],
    json['number'],
    json['subject'],
    json['value'] is int ? json['value'].toDouble() : json['value'],
    json['currencyCode'],
    json['flag'],
    DateTime.parse(json['received']),
    json['read'],
    json['summary'],
  );
}