📅  最后修改于: 2022-03-11 15:04:19.554000             🧑  作者: Mango
//insideclass
ClassName.fromJson(Map json) {
variable1 = json['variable11'];
variable2 = json['variable12'];
variable3 = json['variable13']['variable14'];
}
//uses
//after http request or whatever
Map res = await jsonDecode(response.body.toString());
Classname.fromJson(res);