Rounded corner Textfiled without border color
Create a transparent border:
final border = OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(90.0)),
borderSide: BorderSide(
color: Colors.transparent,
)
);
Another option is using :
borderSide: BorderSide.none
And use it in focusedBorder
and border
properties, also add a Theme to set the cursor and hint Colors:
Theme(
data: Theme.of(context).copyWith(
cursorColor: Colors.red,
hintColor: Colors.transparent,
),
child: TextFormField(
decoration: InputDecoration(
focusedBorder: border,
border: border,
prefixIcon: Icon(
Icons.person,
color: Colors.white,
),
hintStyle: TextStyle(
color: Colors.white, fontFamily: "WorkSansLight"),
filled: true,
fillColor: Colors.white24,
hintText: 'Password'),
),
),
Set:
borderSide: BorderSide.none,
As in:
TextFormField(
decoration: InputDecoration(
prefixIcon: Icon(
Icons.person,
color: Colors.white,
),
border: OutlineInputBorder(
// width: 0.0 produces a thin "hairline" border
borderRadius: BorderRadius.all(Radius.circular(90.0)),
borderSide: BorderSide.none,
),
hintStyle: TextStyle(color: Colors.white,fontFamily: "WorkSansLight"),
filled: true,
fillColor: Colors.white24,
hintText: 'Password'),
),