Skip to content

Commit 4e79142

Browse files
committed
fix: update text golden with proper text style
1 parent 59859da commit 4e79142

2 files changed

Lines changed: 416 additions & 491 deletions

File tree

packages/flutter/test/widgets/checkbox_tester.dart

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ class TestCheckbox extends StatelessWidget {
5555
}
5656
}
5757

58+
// Matches the reported size of Material's Checkbox with the default
59+
// MaterialTapTargetSize.padded (kMinInteractiveDimension = 48.0). The 18×18
60+
// visible box is centered in the 48×48 tap target, which is what pre-
61+
// migration goldens and inline WidgetSpan layouts were calibrated against.
62+
static const double _tapTargetSize = 48.0;
63+
static const double _boxSize = 18.0;
64+
5865
@override
5966
Widget build(BuildContext context) {
6067
return GestureDetector(
@@ -65,12 +72,18 @@ class TestCheckbox extends StatelessWidget {
6572
mixed: tristate && value == null,
6673
enabled: _enabled,
6774
child: SizedBox(
68-
width: 18.0,
69-
height: 18.0,
70-
child: DecoratedBox(
71-
decoration: BoxDecoration(
72-
border: Border.all(),
73-
color: value ?? false ? const Color(0xFF000000) : const Color(0xFFFFFFFF),
75+
width: _tapTargetSize,
76+
height: _tapTargetSize,
77+
child: Center(
78+
child: SizedBox(
79+
width: _boxSize,
80+
height: _boxSize,
81+
child: DecoratedBox(
82+
decoration: BoxDecoration(
83+
border: Border.all(),
84+
color: value ?? false ? const Color(0xFF000000) : const Color(0xFFFFFFFF),
85+
),
86+
),
7487
),
7588
),
7689
),

0 commit comments

Comments
 (0)