Skip to content

Instantly share code, notes, and snippets.

@FantasyCheese
FantasyCheese / node.dart
Created October 17, 2021 17:27
Copy data class with recursive children
class Node {
Node(this.title, [this.children = const []]);
final String title;
final List<Node> children;
}
Node copy(Node n) {
// create new object with data from old object
return Node(
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<item>
<enclosure
sparkle:os="android"
sparkle:version="2.0.0"
url="https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox"/>
<!-- Uncomment this line to force update-->
<!--<sparkle:tags><sparkle:criticalUpdate/></sparkle:tags>-->
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<item>
<enclosure
sparkle:os="ios"
sparkle:version="2.0.0"
url="https://apps.apple.com/tw/app/google/id284815942"/>
<!-- Uncomment this line to force update-->
<!--<sparkle:tags><sparkle:criticalUpdate/></sparkle:tags>-->