import 'Prefs.dart'; class Unit { int id; String rangka; String mesin; String kode; String tahun; String tipe; String warna; String state; String flag; String timestamp; Unit({ this.id, this.rangka, this.mesin, this.kode, this.tahun, this.tipe, this.warna, this.state, this.flag, this.timestamp, }); factory Unit.fromJson(Map json) { return new Unit( id: json[columnName.id], rangka: json[columnName.rangka], mesin: json[columnName.mesin], kode: json[columnName.kode], tahun: json[columnName.tahun], tipe: json[columnName.tipe], warna : json[columnName.warna], state: json[columnName.state], flag: json[columnName.flag], timestamp: json[columnName.timestamp]??'' );} Map toJson() => { columnName.id: id, columnName.rangka: rangka.toUpperCase(), columnName.mesin : mesin.toUpperCase(), columnName.kode : kode.toUpperCase(), columnName.tahun : tahun, columnName.tipe: tipe, columnName.warna: warna, columnName.state :state, columnName.flag :flag, columnName.timestamp :timestamp, }; } class blobImage { int blob_id; var blob_file; String mesin; String lat; String long; String jenis; String no_urut; blobImage({ this.blob_id, this.blob_file, this.mesin, this.lat, this.long, this.jenis, this.no_urut }); Map toJson() => { columnName.blob_id: blob_id, columnName.blob_file : blob_file, columnName.mesin : mesin, columnName.lat : lat, columnName.long : long, columnName.jenis : jenis, columnName.no_urut : no_urut }; factory blobImage.fromJson(Map json) => new blobImage( blob_id: json[columnName.blob_id], blob_file: json[columnName.blob_file], mesin: json[columnName.mesin], lat: json[columnName.lat], long: json[columnName.long], jenis: json[columnName.jenis], no_urut: json[columnName.no_urut] ); } class valueTab { String name; String value; valueTab({ this.name, this.value }); Map toJson() => { columnName.name : name, columnName.value : value, }; factory valueTab.fromJson(Map json) => new valueTab( name: json[columnName.name], value: json[columnName.value], ); } class jenisDrop { String value; String no_urut; jenisDrop({ this.value, this.no_urut }); Map toJson() => { columnName.value : value, columnName.no_urut : no_urut }; factory jenisDrop.fromJson(Map json) => new jenisDrop( value: json[columnName.value], no_urut: json[columnName.no_urut] ); } class Count { int count; Count({ this.count, }); factory Count.fromJson(Map json) => new Count( count: json["count"], ); }