mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
Remove default horizontal padding for Input. (#6437)
This partially reverts https://github.com/flutter/flutter/issues/626 , but horizontal padding is not in the spec, so we still match the spec.
This commit is contained in:
parent
23c52fc7a1
commit
fdb76da5c9
|
@ -192,12 +192,15 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
|
||||||
return new CollapsibleBody(
|
return new CollapsibleBody(
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 16.0),
|
margin: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
child: new Form(
|
child: new Form(
|
||||||
child: new Input(
|
child: new Padding(
|
||||||
hintText: item.hint,
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
labelText: item.name,
|
child: new Input(
|
||||||
value: new InputValue(text: item.value),
|
hintText: item.hint,
|
||||||
formField: new FormField<String>(
|
labelText: item.name,
|
||||||
setter: (String val) { item.value = val; }
|
value: new InputValue(text: item.value),
|
||||||
|
formField: new FormField<String>(
|
||||||
|
setter: (String val) { item.value = val; }
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -74,7 +74,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
|
||||||
),
|
),
|
||||||
body: new Form(
|
body: new Form(
|
||||||
child: new Block(
|
child: new Block(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Input(
|
new Input(
|
||||||
hintText: 'What do people call you?',
|
hintText: 'What do people call you?',
|
||||||
|
@ -113,6 +113,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
new SizedBox(width: 16.0),
|
||||||
new Flexible(
|
new Flexible(
|
||||||
child: new Input(
|
child: new Input(
|
||||||
hintText: 'How do you log in?',
|
hintText: 'How do you log in?',
|
||||||
|
|
|
@ -306,10 +306,7 @@ class _InputState extends State<Input> {
|
||||||
child: new GestureDetector(
|
child: new GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () => _rawInputKey.currentState?.requestKeyboard(),
|
onTap: () => _rawInputKey.currentState?.requestKeyboard(),
|
||||||
child: new Padding(
|
child: child
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
|
||||||
child: child
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue