При открытии клавиатуры содержимое не выталкивается - PullRequest
0 голосов
/ 30 января 2019

Я получил 6 TextFormField при регистрации страницы пользователя, когда я нажимаю для ввода текста, клавиатура открывается, но содержимое не выталкивается, поэтому я не вижу, что пишу в текстовом поле,Я хочу, чтобы содержимое было отправлено.Пожалуйста, помогите!

вот код:

   @override
   Widget build(BuildContext context) {
return new Scaffold(
    resizeToAvoidBottomPadding: false,
    appBar: new AppBar(
      title: new Text("Register"),
    ),
    body: Card(
        child: Padding(
      padding: EdgeInsets.all(8.0),
      child: Form(
        autovalidate: _autoValidate,
        key: formKey,
        child: new SingleChildScrollView(
          child: Column(mainAxisSize: MainAxisSize.max, children: <Widget>[
            new TextFormField(
              decoration: InputDecoration(labelText: "Username"),
              validator: (input) => input.length < 3
                  ? '3 or more char'
                  : null,
              onSaved: (input) => globals.userName = input,
            ),
            new TextFormField(
              obscureText: true,
              decoration: InputDecoration(labelText: "Password"),
              validator: (input) => input.length < 8
                  ? 'min 8 char'
                  : null,
              onSaved: (input) => globals.passWord = input,
            ),
            new TextFormField(
              decoration: InputDecoration(labelText: "Firstname"),
              validator: (input) =>
                  input.length <= 1 ? 'Input your name' : null,
              onSaved: (input) => globals.firstName = input,
            ), //First Name TextBox
            new TextFormField(
              decoration: InputDecoration(labelText: "Lastname"),
              validator: (input) =>
                  input.length <= 1 ? 'Input your last name' : null,
              onSaved: (input) => globals.lastName = input,
            ), //Last Name TextBox
            new TextFormField(
              decoration: InputDecoration(labelText: "Email"),
              onSaved: (input) => globals.eMail = input,
              validator: _validateEmail,
              keyboardType: TextInputType.emailAddress,
            ),
            new TextFormField(
              decoration: InputDecoration(labelText: "Phone"),
              validator: (input) =>
                  input.length != 10 ? 'Input your phone' : null,
              onSaved: (input) => globals.pHone = input,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: <Widget>[
                Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: RaisedButton(
                      onPressed: _submit,
                      child: Text("Registruj se"),
                    ) //Submit Button

                    ),
                _showErrorMessage(),
              ],
            )
          ]),
        ),
      ),
    ),
  ),
 );
  }

1 Ответ

0 голосов
/ 31 января 2019

Удаление: resizeToAvoidBottomPadding: false из скаффолда исправило эту проблему.

...