InputDecoration
is not showing underline below icon in TextFormField
TextFormField(
obscureText: true,
style: TextStyle(color: Colors.white),
keyboardType: TextInputType.text,
//validator: validatePassword,
decoration: InputDecoration(
icon: Icon(Icons.lock_outline,color: Colors.white,),
labelStyle: new TextStyle(color: Colors.white),
enabledBorder: UnderlineInputBorder(
borderSide: new BorderSide(color: Colors.white)),
hintStyle: new TextStyle(
inherit: true,
fontSize: 18.0,
fontFamily: "WorkSansLight",
color: Colors.white,
),
hintText: 'PASSWORD'),
onSaved: (String val) {
},
),
getting this:
Expected:
use - prefixIcon:
instead of icon
TextFormField(
obscureText: true,
style: TextStyle(color: Colors.white),
keyboardType: TextInputType.text,
//validator: validatePassword,
decoration: InputDecoration(
prefixIcon: Icon(
Icons.lock_outline,
color: Colors.white,
),
labelStyle: new TextStyle(color: Colors.white),
enabledBorder: UnderlineInputBorder(
borderSide: new BorderSide(color: Colors.white)),
hintStyle: new TextStyle(
inherit: true,
fontSize: 18.0,
fontFamily: "WorkSansLight",
color: Colors.white,
),
hintText: 'PASSWORD'),
onSaved: (String val) {},
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.