How to add a border in a Container in Flutter

0 votes

Hi Guys,

I have created a Container widget in Flutter. I want to add the border if this container. How can I do that?

Sep 10, 2020 in Others by MD
• 95,340 points
2,097 views

1 answer to this question.

0 votes

Hi@MD,

By default, you can't see any border to your Container. But you can use BoxShadow inside decoration. This helps you to add the border in the container level. You can see the below example.

decoration: BoxDecoration(
                                borderRadius: BorderRadius.circular(20),
                                color: Colors.lightGreen,
                                boxShadow: [
                                  BoxShadow(color: Colors.red, spreadRadius: 3),
                                ],
                              ),
answered Sep 10, 2020 by akhtar
• 38,240 points

Related Questions In Others

0 votes
1 answer

How to add a border to a widget in Flutter?

Hi@akhtar, You need to add the TextField as a child to a Container that has ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,340 points
1,853 views
0 votes
1 answer

How to create a container widget in Flutter?

Hi@akhtar, Container means a parent widget that contains ...READ MORE

answered Jul 28, 2020 in Others by MD
• 95,340 points
658 views
0 votes
1 answer

How to set margin for a Container in Flutter?

Hi@akhtar, Margin property is used to set empty ...READ MORE

answered Jul 29, 2020 in Others by MD
• 95,340 points
3,055 views
0 votes
1 answer

How to add a send button inside TextField in Flutter?

Hi@akhtar, You can use decoration inside your TextField. ...READ MORE

answered Sep 10, 2020 in Others by MD
• 95,340 points
11,131 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,340 points
472 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,340 points
810 views
0 votes
1 answer

How to check the connected device name in Flutter?

Hi@akhtar, Flutter has its command own command to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,340 points
2,870 views
0 votes
1 answer

How to run two commands in one line in Windows CMD?

Hi@MD, You can use the Logical And operator ...READ MORE

answered Oct 5, 2020 in Others by akhtar
• 38,240 points
3,155 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,240 points
337 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP