【发布时间】:2019-03-01 10:12:34
【问题描述】:
如何让 Flutter TextField 接受多行?以下代码不起作用:
body: Padding(
child: Column(
children: [
Text('BIO'),
Expanded(
child: TextField(
autofocus: false,
controller: _text,
// https://stackoverflow.com/a/46767771
keyboardType: TextInputType.multiline,
maxLength: null,
),
),
],
crossAxisAlignment: CrossAxisAlignment.start,
),
padding: const EdgeInsets.all(8),
),
(稍后,我将删除蓝色下划线,它只是显示它是 1-liner)。
我正在使用频道管理员,v1.2.3-pre.66。
【问题讨论】: