File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ EXTERNAL SOURCES:
26
26
SPEC CHECKSUMS:
27
27
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
28
28
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
29
- wakelock: bfc7955c418d0db797614075aabbc58a39ab5107
30
- webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
29
+ wakelock: b0843b2479edbf6504d8d262c2959446f35373aa
30
+ webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
31
31
32
32
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
33
33
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ class Html extends StatelessWidget {
49
49
this .navigationDelegateForIframe,
50
50
}) : document = null ,
51
51
assert (data != null ),
52
- super (key: key ?? UniqueKey ());
52
+ anchorKey = GlobalKey (),
53
+ super (key: key);
53
54
54
55
Html .fromDom ({
55
56
Key ? key,
@@ -66,7 +67,11 @@ class Html extends StatelessWidget {
66
67
this .navigationDelegateForIframe,
67
68
}) : data = null ,
68
69
assert (document != null ),
69
- super (key: key ?? UniqueKey ());
70
+ anchorKey = GlobalKey (),
71
+ super (key: key);
72
+
73
+ /// A unique key for this Html widget to ensure uniqueness of anchors
74
+ final Key anchorKey;
70
75
71
76
/// The HTML data passed to the widget as a String
72
77
final String ? data;
@@ -119,7 +124,7 @@ class Html extends StatelessWidget {
119
124
return Container (
120
125
width: width,
121
126
child: HtmlParser (
122
- key: key ,
127
+ key: anchorKey ,
123
128
htmlData: doc,
124
129
onLinkTap: onLinkTap,
125
130
onImageTap: onImageTap,
You can’t perform that action at this time.
0 commit comments