class User {
int? id;
String? name;
Picture({
this.type,
this.name
});
User.fromJson(Map<dynamic, dynamic> json)
: id = json['id'],
name = json['name'];
}
In the above User Class model, we have defined two properties - id and name. The id property has the type int and the name property has the type String.
0 Comments