removed autofocus from bonus field
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user