Reputation: 165
I want label text inside the border. found some example with container, but the container border will not be change color with error. Container blank : grey color, if it's having error thn red and if it's satisfying condition thn green like image.
Upvotes: 0
Views: 172
Reputation: 338
You can try:
TextField(
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
labelText: "Label",
hintText: "Input Text",
contentPadding: EdgeInsets.fromLTRB(32, 16, 32, 16),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
Or something like in that comment: https://stackoverflow.com/a/68388525/6942599
Upvotes: 1