Home > front end >  Adding just a left side border decoration
Adding just a left side border decoration

Time:02-14

I'm aware of this post how to assign a border to e.g. a Container.

Unfortunately, I failed to find a hint how to only draw the left edge of a Container as a border.

How to assign a border only to one edge of a Widget / Container?

CodePudding user response:

You can add one side border like so

Container(
  decoration: BoxDecoration(
     border: Border(left: BorderSide(width: 1, color: Colors.red)
  ),
  child: //...,
)

There are also right, top, and bottom params

  • Related