@@ -658,7 +658,7 @@ void main() {
658
658
});
659
659
});
660
660
661
- group ('UserMention ' , () {
661
+ group ('Mention ' , () {
662
662
testContentSmoke (ContentExample .userMentionPlain);
663
663
testContentSmoke (ContentExample .userMentionSilent);
664
664
testContentSmoke (ContentExample .groupMentionPlain);
@@ -670,10 +670,10 @@ void main() {
670
670
testContentSmoke (ContentExample .legacyChannelWildcardMentionSilent);
671
671
testContentSmoke (ContentExample .legacyChannelWildcardMentionSilentClassOrderReversed);
672
672
673
- UserMention ? findUserMentionInSpan (InlineSpan rootSpan) {
674
- UserMention ? result;
673
+ Mention ? findMentionWidgetInSpan (InlineSpan rootSpan) {
674
+ Mention ? result;
675
675
rootSpan.visitChildren ((span) {
676
- if (span case (WidgetSpan (child: UserMention () && var widget))) {
676
+ if (span case (WidgetSpan (child: Mention () && var widget))) {
677
677
result = widget;
678
678
return false ;
679
679
}
@@ -682,7 +682,7 @@ void main() {
682
682
return result;
683
683
}
684
684
685
- TextStyle textStyleFromWidget (WidgetTester tester, UserMention widget, String mentionText) {
685
+ TextStyle textStyleFromWidget (WidgetTester tester, Mention widget, String mentionText) {
686
686
return mergedStyleOf (tester,
687
687
findAncestor: find.byWidget (widget), mentionText)! ;
688
688
}
@@ -691,7 +691,7 @@ void main() {
691
691
await checkFontSizeRatio (tester,
692
692
targetHtml: '<span class="user-mention" data-user-id="13313">@Chris Bobbe</span>' ,
693
693
targetFontSizeFinder: (rootSpan) {
694
- final widget = findUserMentionInSpan (rootSpan);
694
+ final widget = findMentionWidgetInSpan (rootSpan);
695
695
final style = textStyleFromWidget (tester, widget! , '@Chris Bobbe' );
696
696
return style.fontSize! ;
697
697
});
@@ -704,7 +704,7 @@ void main() {
704
704
'<p><span class="user-mention silent" data-user-id="2187">Greg Price</span></p>' ),
705
705
styleFinder: (tester) {
706
706
return textStyleFromWidget (tester,
707
- tester.widget (find.byType (UserMention )), 'Greg Price' );
707
+ tester.widget (find.byType (Mention )), 'Greg Price' );
708
708
});
709
709
710
710
// TODO(#647):
@@ -718,7 +718,7 @@ void main() {
718
718
'<h1><span class="user-mention silent" data-user-id="13313">Chris Bobbe</span></h1>' ),
719
719
styleFinder: (tester) {
720
720
return textStyleFromWidget (tester,
721
- tester.widget (find.byType (UserMention )), 'Chris Bobbe' );
721
+ tester.widget (find.byType (Mention )), 'Chris Bobbe' );
722
722
});
723
723
724
724
// TODO(#647):
0 commit comments