@@ -34,8 +34,6 @@ final class DevToolsClearableTextField extends StatelessWidget {
3434 final bool ? enabled;
3535 final bool roundedBorder;
3636
37- static const _contentVerticalPadding = 6.0 ;
38-
3937 /// This is the default border radius used by the [OutlineInputBorder]
4038 /// constructor.
4139 static const _defaultInputBorderRadius =
@@ -45,8 +43,10 @@ final class DevToolsClearableTextField extends StatelessWidget {
4543 Widget build (BuildContext context) {
4644 final theme = Theme .of (context);
4745 return SizedBox (
48- height: defaultTextFieldHeight,
46+ height: defaultTextFieldHeight + densePadding ,
4947 child: TextField (
48+ textAlignVertical: TextAlignVertical .center,
49+ cursorHeight: defaultTextFieldHeight / 2 ,
5050 autofocus: autofocus,
5151 controller: controller,
5252 enabled: enabled,
@@ -56,10 +56,9 @@ final class DevToolsClearableTextField extends StatelessWidget {
5656 decoration: InputDecoration (
5757 isDense: true ,
5858 contentPadding: const EdgeInsets .only (
59- top: _contentVerticalPadding ,
60- bottom: _contentVerticalPadding ,
59+ top: densePadding ,
60+ bottom: densePadding ,
6161 left: denseSpacing,
62- right: densePadding,
6362 ),
6463 constraints: BoxConstraints (
6564 minHeight: defaultTextFieldHeight,
@@ -75,20 +74,20 @@ final class DevToolsClearableTextField extends StatelessWidget {
7574 hintText: hintText,
7675 hintStyle: theme.subtleTextStyle,
7776 prefixIcon: prefixIcon,
78- suffix : SizedBox (
79- height: inputDecorationElementHeight,
80- child: Row (
81- mainAxisSize: MainAxisSize .min,
82- children: [
83- ...additionalSuffixActions,
84- InputDecorationSuffixButton .clear (
85- onPressed: () {
86- controller.clear ();
87- onChanged? .call ('' );
88- },
89- ),
90- ],
91- ),
77+ suffixIcon : SizedBox (
78+ height: inputDecorationElementHeight,
79+ child: Row (
80+ mainAxisSize: MainAxisSize .min,
81+ children: [
82+ ...additionalSuffixActions,
83+ InputDecorationSuffixButton .clear (
84+ onPressed: () {
85+ controller.clear ();
86+ onChanged? .call ('' );
87+ },
88+ ),
89+ ],
90+ ),
9291 ),
9392 ),
9493 ),
0 commit comments