Flutter: Outline input border
For others coming here who just want a TextField
with a border all around it:
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
),
),
What your looking for is - enabledBorder
property of InputDecoration
.
If you want to Change Border on focus use - focusedBorder
TextField(
decoration: new InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.greenAccent, width: 5.0),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.red, width: 5.0),
),
hintText: 'Mobile Number',
),
),