configData.fromJson constructor

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

Implementation

configData.fromJson(Map<String, dynamic> json) {
  apiUrl = json['api_url'];
  gatewayApiUrl = json['gateway_api_url'];
  gatewayApiKey = json['gateway_api_key'];
  supportUrl = json['support_url'];
  stores = json['stores'];
  products = json['products'];
  if (json['countries'] != null) {
    countries = <Countries>[];
    json['countries'].forEach((v) {
      countries?.add(new Countries.fromJson(v));
    });
  }
  googleMapsApiKey = json['google_maps_api_key'];

  if (json['payment_methods'] != null) {
    final v = json['payment_methods'];
    final arr0 = <Payment_Methods>[];
    v.forEach((v) {
      arr0.add(Payment_Methods.fromJson(v));
    });
    payment_methods = arr0;
  }
}