class NearbyGeneratorsResponse { List? list; int? error; int? sessionExists; NearbyGeneratorsResponse({this.list, this.error, this.sessionExists}); NearbyGeneratorsResponse.fromJson(Map json) { if (json['list'] != null) { list = []; json['list'].forEach((v) { list!.add(new Nearbygenerators.fromJson(v)); }); } error = json['error']; sessionExists = json['session_exists']; } Map toJson() { final Map data = new Map(); if (this.list != null) { data['list'] = this.list!.map((v) => v.toJson()).toList(); } data['error'] = this.error; data['session_exists'] = this.sessionExists; return data; } } class Nearbygenerators { String? generatorId; String? loc; String? productName; String? accName; String? distance; Nearbygenerators( {this.generatorId, this.loc, this.productName, this.accName, this.distance}); Nearbygenerators.fromJson(Map json) { generatorId = json['generator_id']; loc = json['loc']; productName = json['product_name']; accName = json['acc_name']; distance = json['distance']; } Map toJson() { final Map data = new Map(); data['generator_id'] = this.generatorId; data['loc'] = this.loc; data['product_name'] = this.productName; data['acc_name'] = this.accName; data['distance'] = this.distance; return data; } }