如何将文本表单字段下的线扩展到可见性图标下?
How to extend the line under text form field till under visibility icon?
我有一个用于输入密码的文本表单字段,我在该字段中添加了一个可见性图标按钮。如何将下划线延伸到图标下方?
(文本表单字段中有一个验证器,所以我想要扩展完全相同的行以便行为相同)。
将 IconButton
定义为 TextFormField
中的 prefixIcon
:
child: TextFormField(
decoration: InputDecoration(
prefixIcon: IconButton(
icon: Icon(Icons.visibility),
onPressed: () {},
),
),
...
),
我有一个用于输入密码的文本表单字段,我在该字段中添加了一个可见性图标按钮。如何将下划线延伸到图标下方? (文本表单字段中有一个验证器,所以我想要扩展完全相同的行以便行为相同)。
将 IconButton
定义为 TextFormField
中的 prefixIcon
:
child: TextFormField(
decoration: InputDecoration(
prefixIcon: IconButton(
icon: Icon(Icons.visibility),
onPressed: () {},
),
),
...
),