import 'package:astronote_app/models/datas.dart'; class Api { String status; String api; String id; Datas datas; Api ({this.status, this.api, this.id, this.datas}); Api.fromJson(Map json) { status = json['status']; api = json['api']; id = json['id']; datas = json['datas'] != null ? new Datas.fromJson(json['datas']) : null; } Map toJson() { final Map data = new Map(); data['status'] = this.status; data['api'] = this.api; data['id'] = this.id; if (this.datas != null) { data['datas'] = this.datas.toJson(); } return data; } }