toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['name'] = this.name;
  if (this.items != null) {
    data['items'] = this.items!.map((v) => v.toJson()).toList();
  }
  if (this.names != null) {
    data['names'] = this.names!.map((v) => v.toJson()).toList();
  }
  if (this.pocket != null) {
    data['pocket'] = this.pocket!.toJson();
  }
  return data;
}