@@ -79,6 +79,10 @@ TextStyle? mergedStyleOfSubstring(InlineSpan rootSpan, Pattern substringPattern)
79
79
});
80
80
}
81
81
82
+ /// A callback that finds some target subspan within the given span,
83
+ /// and reports the target's font size.
84
+ typedef TargetFontSizeFinder = double Function (InlineSpan rootSpan);
85
+
82
86
void main () {
83
87
// For testing a new content feature:
84
88
//
@@ -495,9 +499,9 @@ void main() {
495
499
496
500
testContentSmoke (ContentExample .mathBlock);
497
501
498
- /// Make a [targetFontSizeFinder] for [checkFontSizeRatio] ,
502
+ /// Make a [TargetFontSizeFinder] to pass to [checkFontSizeRatio] ,
499
503
/// from a target [Pattern] (such as a string).
500
- mkTargetFontSizeFinderFromPattern (Pattern targetPattern)
504
+ TargetFontSizeFinder mkTargetFontSizeFinderFromPattern (Pattern targetPattern)
501
505
=> (InlineSpan rootSpan)
502
506
=> mergedStyleOfSubstring (rootSpan, targetPattern)! .fontSize! ;
503
507
@@ -512,7 +516,7 @@ void main() {
512
516
/// in [GlobalTime] .)
513
517
Future <void > checkFontSizeRatio (WidgetTester tester, {
514
518
required String targetHtml,
515
- required double Function ( InlineSpan rootSpan) targetFontSizeFinder,
519
+ required TargetFontSizeFinder targetFontSizeFinder,
516
520
}) async {
517
521
await prepareContent (tester, plainContent (
518
522
'<h1>header-plain $targetHtml </h1>\n '
0 commit comments