class ScanModel { int id; String tipo; String valor; ScanModel({ this.id, this.tipo, this.valor, }); factory ScanModel.fromJson(Map json) => new ScanModel( id: json["id"], tipo: json["tipo"], valor: json["valor"], ); Map toJson() => { "id": id, "tipo": tipo, "valor": valor, }; }