Map<String, dynamic> toJson() { final map = <String, dynamic>{}; if (list != null) { map['list'] = list?.map((v) => v.toJson()).toList(); } return map; }