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()); // Нельзя добавить еще одно поле таким же способом widgetList.add(getInputField()); // Нельзя добавить еще одно поле таким же способом
if (this.flavor != 'autobonus') { if (this.flavor != 'autobonus') {
if (this.loyalityType == 'bonus') { if (this.loyalityType == 'bonus') {
widgetList.add(getBonusInputField()); widgetList.add(getBonusInputField());
@@ -118,6 +116,21 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
} }
getBonusInputField() { 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( return new Column(
children: <Widget>[ children: <Widget>[
new Container( new Container(
@@ -128,20 +141,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
), ),
padding: getInputFieldContainerPadding(), padding: getInputFieldContainerPadding(),
decoration: getInputFieldContainerDecoration(), decoration: getInputFieldContainerDecoration(),
child: new TextField( child: bonusTextField
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,
)
), ),
new Container( new Container(
margin: new EdgeInsets.only( margin: new EdgeInsets.only(
@@ -207,7 +207,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
}); });
}, },
textAlign: TextAlign.center, textAlign: TextAlign.center,
autofocus: true, autofocus: true
); );
} }