我需要一个在一行中同时包含 suffixIcon 和普通图标的 FormField。
2090 次
2 回答
1
以下是将图标添加到文本字段的三种方法
TextField(
controller: ...,
decoration: InputDecoration(
icon: Icon(...), //Icon outside
prefixIcon: Icon(...), //Icon at the beginning
suffixIcon: Icon(...), //Icon at the end
),
),
于 2019-08-26T13:02:13.670 回答
0
您可以使用 Row 并在任何您想要的地方添加图标。
Container(
child: Row(
children: <widget>[
Icon(),
Icon(),
Expanded(child: TextField()),
Icon(),
Icon(),
]),
),
于 2019-08-26T15:17:37.047 回答