@@ -297,7 +297,7 @@ void main() {
297
297
group ('LinkNode interactions' , () {
298
298
// The Flutter test font uses square glyphs, so width equals height:
299
299
// https://github.com/flutter/flutter/wiki/Flutter-Test-Fonts
300
- const fontSize = 14.0 ;
300
+ // We use this to simulate taps on specific glyphs.
301
301
302
302
Future <void > prepareContent (WidgetTester tester, String html) async {
303
303
await testBinding.globalStore.add (eg.selfAccount, eg.initialSnapshot ());
@@ -323,6 +323,8 @@ void main() {
323
323
}, variant: const TargetPlatformVariant ({TargetPlatform .android, TargetPlatform .iOS}));
324
324
325
325
testWidgets ('multiple links in paragraph' , (tester) async {
326
+ final fontSize = Paragraph .textStyle.fontSize! ;
327
+
326
328
await prepareContent (tester,
327
329
'<p><a href="https://a/">foo</a> bar <a href="https://b/">baz</a></p>' );
328
330
final base = tester.getTopLeft (find.text ('foo bar baz' ))
@@ -349,6 +351,8 @@ void main() {
349
351
});
350
352
351
353
testWidgets ('link containing other spans' , (tester) async {
354
+ final fontSize = Paragraph .textStyle.fontSize! ;
355
+
352
356
await prepareContent (tester,
353
357
'<p><a href="https://a/">two <strong><em><code>words</code></em></strong></a></p>' );
354
358
final base = tester.getTopLeft (find.text ('two words' ))
0 commit comments