@@ -11,6 +11,11 @@ class VideoNode extends UrlMediaNode {
11
11
super .altText = '' ,
12
12
super .blockAttribution = videoAttribution,
13
13
});
14
+
15
+ @override
16
+ DocumentNode copy () {
17
+ return VideoNode (id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
18
+ }
14
19
}
15
20
16
21
/// [DocumentNode] that represents an audio source at a URL.
@@ -23,6 +28,11 @@ class AudioNode extends UrlMediaNode {
23
28
super .altText = '' ,
24
29
super .blockAttribution = audioAttribution,
25
30
});
31
+
32
+ @override
33
+ DocumentNode copy () {
34
+ return AudioNode (id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
35
+ }
26
36
}
27
37
28
38
/// [DocumentNode] that represents a file at a URL.
@@ -35,6 +45,11 @@ class FileNode extends UrlMediaNode {
35
45
super .altText = '' ,
36
46
super .blockAttribution = fileAttribution,
37
47
});
48
+
49
+ @override
50
+ DocumentNode copy () {
51
+ return FileNode (id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
52
+ }
38
53
}
39
54
40
55
/// [DocumentNode] that represents a media source that exists a given [url] .
@@ -86,6 +101,17 @@ class UrlMediaNode extends BlockNode with ChangeNotifier {
86
101
return other is UrlMediaNode && url == other.url && altText == other.altText;
87
102
}
88
103
104
+ @override
105
+ DocumentNode copy () {
106
+ return UrlMediaNode (
107
+ id: id,
108
+ url: url,
109
+ altText: altText,
110
+ blockAttribution: getMetadataValue ("blockType" ),
111
+ metadata: metadata,
112
+ );
113
+ }
114
+
89
115
@override
90
116
bool operator == (Object other) =>
91
117
identical (this , other) ||
0 commit comments