import 'Position.dart'; class Address { Address({ this.id, this.address, this.home, this.position, this.timestmp,}); Address.fromJson(dynamic json) { id = json['id']; address = json['address']; home = json['home']; position = json['position'] != null ? Position.fromJson(json['position']) : null; timestmp = json['timestmp']; } int? id; String? address; bool? home; Position? position; int? timestmp; Map toJson() { final map = {}; map['id'] = id; map['address'] = address; map['home'] = home; if (position != null) { map['position'] = position?.toJson(); } map['timestmp'] = timestmp; return map; } }