我想自定义TextField右侧的图标,但使用Image后无法更改图标大小。如果使用Icon,则可以更改大小,为什么?我该如何使用自定义图像并调整其大小?
new TextField(
decoration: InputDecoration(
hintText: '请输入密码',
suffixIcon: new GestureDetector(
onTap: () {},
child: new Container(
color: Colors.cyan,
child: Image(
image: AssetImage(
'images/login/icon_show_sel.png',
),
height: 20,
width: 20,
),
),
),
),
),