Unverified Commit b22ab511 authored by Mitchell Goodwin's avatar Mitchell Goodwin Committed by GitHub

Reland Cupertino text input padding (#115164)

* Update Cupertino text input padding

* Remove comment

* Update tests
parent 3cafeb3e
......@@ -109,10 +109,10 @@ class CupertinoSearchTextField extends StatefulWidget {
this.backgroundColor,
this.borderRadius,
this.keyboardType = TextInputType.text,
this.padding = const EdgeInsetsDirectional.fromSTEB(3.8, 8, 5, 8),
this.padding = const EdgeInsetsDirectional.fromSTEB(5.5, 8, 5.5, 8),
this.itemColor = CupertinoColors.secondaryLabel,
this.itemSize = 20.0,
this.prefixInsets = const EdgeInsetsDirectional.fromSTEB(6, 0, 0, 4),
this.prefixInsets = const EdgeInsetsDirectional.fromSTEB(6, 0, 0, 3),
this.prefixIcon = const Icon(CupertinoIcons.search),
this.suffixInsets = const EdgeInsetsDirectional.fromSTEB(0, 0, 5, 2),
this.suffixIcon = const Icon(CupertinoIcons.xmark_circle_fill),
......
......@@ -215,7 +215,7 @@ class CupertinoTextField extends StatefulWidget {
this.controller,
this.focusNode,
this.decoration = _kDefaultRoundedBorderDecoration,
this.padding = const EdgeInsets.all(6.0),
this.padding = const EdgeInsets.all(7.0),
this.placeholder,
this.placeholderStyle = const TextStyle(
fontWeight: FontWeight.w400,
......@@ -362,7 +362,7 @@ class CupertinoTextField extends StatefulWidget {
this.controller,
this.focusNode,
this.decoration,
this.padding = const EdgeInsets.all(6.0),
this.padding = const EdgeInsets.all(7.0),
this.placeholder,
this.placeholderStyle = _kDefaultPlaceholderStyle,
this.prefix,
......
......@@ -107,7 +107,7 @@ void main() {
expect(
tester.getTopLeft(find.text('initial')) -
tester.getTopLeft(find.byType(CupertinoSearchTextField)),
const Offset(29.8, 8.0),
const Offset(31.5, 8.0),
);
},
);
......@@ -231,7 +231,7 @@ void main() {
);
expect(
tester.getTopRight(find.byIcon(CupertinoIcons.search)).dx + 3.8,
tester.getTopRight(find.byIcon(CupertinoIcons.search)).dx + 5.5,
tester.getTopLeft(find.byType(EditableText)).dx,
);
......@@ -239,7 +239,7 @@ void main() {
tester.getTopLeft(find.byType(EditableText)).dx,
tester.getTopLeft(find.byType(CupertinoSearchTextField)).dx +
tester.getSize(find.byIcon(CupertinoIcons.search)).width +
9.8,
11.5,
);
},
);
......@@ -258,7 +258,7 @@ void main() {
);
expect(
tester.getTopRight(find.byType(EditableText)).dx + 5.0,
tester.getTopRight(find.byType(EditableText)).dx + 5.5,
tester.getTopLeft(find.byIcon(CupertinoIcons.xmark_circle_fill)).dx,
);
......@@ -268,7 +268,7 @@ void main() {
tester
.getSize(find.byIcon(CupertinoIcons.xmark_circle_fill))
.width -
10.0,
10.5,
);
},
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment