Получение переполнения экрана при заполнении столбца во флаттере - PullRequest
0 голосов
/ 25 декабря 2018

Я знаю, что мы можем использовать ListView или Expanded вместо столбца в таком случае, но когда я использую ListView вместо Column, я получаю исключение времени выполнения для приведенного ниже кода.Текстовые поля в столбце переполняются, когда клавиатура открывается после фокусировки ввода.

class _AddAchievementDialog extends State<AddAchievementDialog> {
  String title, description, longDescription, linksString, id;

  List<String> links;

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      title: Text(
        "Add",
        textAlign: TextAlign.center,
      ),
      shape: RoundedRectangleBorder(),
      contentPadding: EdgeInsets.all(10),
      content: Container(
        padding: EdgeInsets.all(10),
        height: 350,
        child: Column(
          children: <Widget>[
            TextField(
              decoration: InputDecoration(labelText: 'Title'),
            ),
            TextField(
              keyboardType: TextInputType.multiline,
              maxLines: 2,
              decoration: InputDecoration(labelText: 'Description'),
            ),
            TextField(
              keyboardType: TextInputType.multiline,
              maxLines: 3,
              decoration: InputDecoration(labelText: 'Long Description'),
            ),
            TextField(
              decoration:
                  InputDecoration(labelText: 'Links (seperated by comma) '),
            ),
          ],
        ),
      ),
      actions: <Widget>[
        RaisedButton(
          child: Text("Submit"),
        )
      ],
    );
  }
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...