class Product {
String status;
List<List> note;
List<List> table;
Product({this.status, this.note, this.table});
Product.fromJson(Map<String, dynamic> json) {
status = json['status'];
if (json['note'] != null) {
note = <List>[];
json['note'].forEach((v) { note.add(new List.fromJson(v)); });
}
if (json['table'] != null) {
table = <List>[];
json['table'].forEach((v) { table.add(new List.fromJson(v)); });
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
if (this.note != null) {
data['note'] = this.note.map((v) => v.toJson()).toList();
}
if (this.table != null) {
data['table'] = this.table.map((v) => v.toJson()).toList();
}
return data;
}
}
The class 'List' doesn't have a constructor named 'fromJson'. Try invoking a different constructor, or define a constructor named 'fromJson'. / Error in List.fromJson and v.toJson