toJson method Null safety
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json.addAll({
'name': name,
'description': description,
'size': size,
'children': children?.map((f) => f.toJson()).toList(),
});
return json;
}