@@ -801,15 +801,16 @@ void main() {
801
801
tooltipKey.currentState? .ensureTooltipVisible ();
802
802
await tester.pump (const Duration (seconds: 2 )); // faded in, show timer started (and at 0.0)
803
803
804
- final RenderBox tip = tester.renderObject (
805
- _findTooltipContainer (tooltipText),
806
- );
804
+ final RenderBox tip = tester.renderObject (_findTooltipContainer (tooltipText));
807
805
expect (tip.size.height, equals (32.0 ));
808
806
expect (tip.size.width, equals (74.0 ));
809
807
expect (tip, paints..rrect (
810
808
rrect: RRect .fromRectAndRadius (tip.paintBounds, const Radius .circular (4.0 )),
811
809
color: const Color (0xe6616161 ),
812
810
));
811
+
812
+ final Container tooltipContainer = tester.firstWidget <Container >(_findTooltipContainer (tooltipText));
813
+ expect (tooltipContainer.padding, const EdgeInsets .symmetric (horizontal: 16.0 , vertical: 4.0 ));
813
814
});
814
815
815
816
testWidgets ('Tooltip default size, shape, and color test for Desktop' , (WidgetTester tester) async {
@@ -830,14 +831,15 @@ void main() {
830
831
final RenderParagraph tooltipRenderParagraph = tester.renderObject <RenderParagraph >(find.text (tooltipText));
831
832
expect (tooltipRenderParagraph.textSize.height, equals (12.0 ));
832
833
833
- final RenderBox tooltipContainer = tester.renderObject (
834
- _findTooltipContainer (tooltipText),
835
- );
836
- expect (tooltipContainer.size.height, equals (24.0 ));
837
- expect (tooltipContainer, paints..rrect (
838
- rrect: RRect .fromRectAndRadius (tooltipContainer.paintBounds, const Radius .circular (4.0 )),
834
+ final RenderBox tooltipRenderBox = tester.renderObject (_findTooltipContainer (tooltipText));
835
+ expect (tooltipRenderBox.size.height, equals (24.0 ));
836
+ expect (tooltipRenderBox, paints..rrect (
837
+ rrect: RRect .fromRectAndRadius (tooltipRenderBox.paintBounds, const Radius .circular (4.0 )),
839
838
color: const Color (0xe6616161 ),
840
839
));
840
+
841
+ final Container tooltipContainer = tester.firstWidget <Container >(_findTooltipContainer (tooltipText));
842
+ expect (tooltipContainer.padding, const EdgeInsets .symmetric (horizontal: 8.0 , vertical: 4.0 ));
841
843
}, variant: const TargetPlatformVariant (< TargetPlatform > {TargetPlatform .macOS, TargetPlatform .linux, TargetPlatform .windows}));
842
844
843
845
testWidgets ('Can tooltip decoration be customized' , (WidgetTester tester) async {
@@ -1437,7 +1439,7 @@ void main() {
1437
1439
tip = tester.renderObject (
1438
1440
_findTooltipContainer (tooltipText),
1439
1441
);
1440
- expect (tip.size.height, equals (56 .0 ));
1442
+ expect (tip.size.height, equals (64 .0 ));
1441
1443
});
1442
1444
1443
1445
testWidgets ('Tooltip text displays with richMessage' , (WidgetTester tester) async {
0 commit comments