// To parse this JSON data, do // // final patent = patentFromJson(jsonString); import 'dart:convert'; List patentFromJson(String str) => List.from(json.decode(str).map((x) => Patent.fromJson(x))); String patentToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); class Patent { int id; int userId; String patentTitle; String status; Patent({ required this.id, required this.userId, required this.patentTitle, required this.status, }); factory Patent.fromJson(Map json) => Patent( id: json["id"], userId: json["user_id"], patentTitle: json["Patent Title"], status: json["Status"], ); Map toJson() => { "id": id, "user_id": userId, "Patent Title": patentTitle, "Status": status, }; }