removed autofocus from bonus field

This commit is contained in:
Semyon Babushkin
2017-11-23 18:09:25 +03:00
parent 857154faf8
commit c1bff19d1d

View File

@@ -77,8 +77,6 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
widgetList.add(getInputField()); // Нельзя добавить еще одно поле таким же способом
if (this.flavor != 'autobonus') {
if (this.loyalityType == 'bonus') {
widgetList.add(getBonusInputField());
@@ -118,6 +116,21 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
}
getBonusInputField() {
TextField bonusTextField = new TextField(
keyboardType: TextInputType.number,
decoration: new InputDecoration.collapsed(
hintText: StringsLocalization.bonusHint(),
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)
),
controller: bonusController,
onSubmitted: (String text) {
setState(() {
bonusController.text = text;
});
},
textAlign: TextAlign.center,
);
return new Column(
children: <Widget>[
new Container(
@@ -128,20 +141,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
),
padding: getInputFieldContainerPadding(),
decoration: getInputFieldContainerDecoration(),
child: new TextField(
keyboardType: TextInputType.number,
decoration: new InputDecoration.collapsed(
hintText: StringsLocalization.bonusHint(),
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)),
controller: bonusController,
onSubmitted: (String text) {
setState(() {
bonusController.text = text;
});
},
textAlign: TextAlign.center,
autofocus: true,
)
child: bonusTextField
),
new Container(
margin: new EdgeInsets.only(
@@ -207,7 +207,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
});
},
textAlign: TextAlign.center,
autofocus: true,
autofocus: true
);
}