I can see the color change of enabledBorder
and focusedBorder
right away, but I can’t see the color change of the border
whole codes
TextField(
enabled: true,
decoration: InputDecoration(
hintText: "영화 제목을 검색해주세요.",
helperText: 'helper',
labelText: 'label',
counterText: 'counter',
border: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red, // Default border color
),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue, // 테두리를 투명하게 만듭니다.
),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.green, // Border color when focused
),
),
suffixIcon: IconButton(
onPressed: () {},
icon: Icon(Icons.search),
),
),
),
I wonder why the color change of the border is invisible and how can I change it
I’ve changed the color of the appbar to be transparent, and I’ve disabled the border
2
Answers
The radius of the border must be provided and also the width in focusedBorder as well as enabledBorder.
According to the documentation here.
If you are trying to set the color of the disabled textfield. Then you should use