Map<String, Object?> toJson() => super.toJson() ..addAll({ 'children': children.map((child) => child.toJson()).toList(), if (overrideType != null) 'overrideType': overrideType, });