Issue
how to change the border colour of this text field to white. here's my code for text field. default it display as a black border. I want to fill the text box with white colour and white padding.
Widget TextBox() => Container(
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Container(
height: 60,
width: 300,
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(borderRadius:BorderRadius.circular(15), ),
hintText: 'Enter Name',
fillColor: Colors.white,filled: true
// Border
),
)),
]),
);
Solution
Try this,
Widget TextBox() => Container(
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Container(
height: 60,
width: 300,
child: TextField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // change color you want...
),
border: OutlineInputBorder(borderRadius:BorderRadius.circular(15)),
hintText: 'Enter Name',
fillColor: Colors.white,filled: true
// Border
),
)),
]),
);
Answered By - Yashraj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.