ICurrency.fromJson constructor

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

Implementation

factory ICurrency.fromJson(Map<String, dynamic> json) {
  return ICurrency(
    currencyCode:
        json.containsKey('currencycode') ? json['currencycode'] : '-',
    currencyNumber:
        json.containsKey('currencynumber') ? json['currencynumber'] : 0,
    currencyName:
        json.containsKey('currencyName') ? json['currencyname'] : '-',
    id: json.containsKey('_id') ? json['_id'] : '-',
    currencyPic: json.containsKey('currencypic') ? json['currencypic'] : '-',
  );
}