@@ -455,7 +455,7 @@ class InlineContent extends StatelessWidget {
455
455
456
456
@override
457
457
Widget build (BuildContext context) {
458
- return Text .rich (_builder.build ());
458
+ return Text .rich (_builder.build (context ));
459
459
}
460
460
}
461
461
@@ -464,15 +464,20 @@ class _InlineContentBuilder {
464
464
465
465
final InlineContent widget;
466
466
467
- InlineSpan build () {
467
+ InlineSpan build (BuildContext context) {
468
+ _context = context;
468
469
assert (_recognizer == widget.recognizer);
469
470
assert (_recognizerStack == null || _recognizerStack! .isEmpty);
470
471
final result = _buildNodes (widget.nodes, style: widget.style);
472
+ assert (identical (_context, context));
473
+ _context = null ;
471
474
assert (_recognizer == widget.recognizer);
472
475
assert (_recognizerStack == null || _recognizerStack! .isEmpty);
473
476
return result;
474
477
}
475
478
479
+ BuildContext ? _context;
480
+
476
481
// Why do we have to track `recognizer` here, rather than apply it
477
482
// once at the top of the affected span? Because the events don't bubble
478
483
// within a paragraph:
@@ -532,7 +537,7 @@ class _InlineContentBuilder {
532
537
}
533
538
534
539
InlineSpan _buildStrong (StrongNode node) => _buildNodes (node.nodes,
535
- style: const TextStyle (fontWeight : FontWeight .w600 ));
540
+ style: weightVariableTextStyle (_context, wght : 600 , wghtIfPlatformRequestsBold : 900 ));
536
541
537
542
InlineSpan _buildEmphasis (EmphasisNode node) => _buildNodes (node.nodes,
538
543
style: const TextStyle (fontStyle: FontStyle .italic));
0 commit comments