我还是个初学者,正在学习文本字段.我有一个文本字段,如下所示:
我想在前缀图标和可编辑文本之间添加一些填充.以下是我的代码:
TextField(
style: const TextStyle(
color: Color.fromARGB(125, 0, 0, 0),
),
decoration: InputDecoration(
border: const OutlineInputBorder(),
hintText: 'Full Name',
hintStyle: TextStyle(color: Colors.grey[300]),
fillColor: Colors.white,
filled: true,
prefixIcon: Container(
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.grey[300]!,
),
),
),
child: const Icon(
Icons.person_outline,
color: kPurple,
),
),
),
cursorColor: kPurple,
)