2

I have a special requirement on my Container border. It should only have a border on the left, right and bottom but not on the top.

Container(
 decoration: BoxDecoration(
 color: Color.fromRGBO(146, 94, 58, 1.0),
 border: Border.all(
 color: Color.fromRGBO(85, 63, 48, 1.0),
 width: 2,
 ),
 borderRadius: BorderRadius.only(
 bottomLeft: Radius.circular(2),
 bottomRight: Radius.circular(2),
 ),
 ),
 )

I can only find .all and .symmetric but nothing like .only which I have seen for the BorderRadius Widget. Why is it missing for Border and how can I make this still work?

asked Sep 13, 2022 at 9:03

1 Answer 1

4

look this question

and you can read this article

Container(
 decoration: BoxDecoration(
 border: Border(
 bottom: BorderSide(width: 1.5, color: Colors.grey[300]),
 ),
 ),
)
answered Sep 13, 2022 at 9:08
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.