File tree Expand file tree Collapse file tree
packages/flutter/test/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ),
You can’t perform that action at this time.
0 commit comments