I want to design the flutter text field like this can anyone help me.
Asked
Active
Viewed 8,761 times
4

Rakesh Shriwas
- 611
- 2
- 7
- 15
-
have you tried anything?if so- what is not working - show us some code. – AADProgramming Jan 11 '20 at 06:14
-
Yes I tried it but not achieve that design. – Rakesh Shriwas Jan 11 '20 at 06:17
-
You need to show your code in your post so that other developers can see the issue and help you further – AADProgramming Jan 11 '20 at 06:18
2 Answers
8
Container(
padding: EdgeInsets.fromLTRB(10,2,10,2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
border: Border.all(color: Colors.red)
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
labelText: "First Name",
),
controller: controller,
),
)

Ishan Fernando
- 2,758
- 1
- 31
- 38
-
When I have multiple text field and I am focused only on one text field then how to show active text field border red and rest of the grey. – Rakesh Shriwas Jan 15 '20 at 05:41
-
you can set a selected textfield when tap and build the widget tree.Then check the select one and set the border based on that. But not sure whether it a correct way of doing. – Ishan Fernando Jan 15 '20 at 17:06