在文本字段中输入文本时,有一个下划线会一直保留到我键入为止,并在我关闭键盘时一直消失:
TextField(
style: TextStyle(
decoration: TextDecoration.none,
color: Colors.white,
),
cursorColor: Colors.grey.withOpacity(0.8),
decoration: InputDecoration(
labelText: "email",
labelStyle: TextStyle(decoration: TextDecoration.none),
hintStyle: TextStyle(
color: Colors.grey,
),
hintText: "email",
filled: true,
fillColor: Colors.grey.withOpacity(0.5),
prefixIcon: Icon(
Icons.alternate_email,
color: Colors.grey.withOpacity(0.8),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(100),
borderSide: BorderSide.none,
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(100),
borderSide: BorderSide.none,
),
),
),
答案 0 :(得分:0)
您可以在输入装饰中使用spinner.setAdapter(dataAdapter);
答案 1 :(得分:0)