Home > Blockchain >  I am trying to reduce the width of my container border in flutter, the last I can go is "width:
I am trying to reduce the width of my container border in flutter, the last I can go is "width:

Time:04-01

       Container(
            decoration: BoxDecoration(
              border: Border.all(width:1.0),// want to reduce the width to less than 1
              color: Colors.yellow,
              borderRadius: BorderRadius.circular(20.0),
            ),

CodePudding user response:

you can use double value like below

         Container(
            decoration: BoxDecoration(
              border: Border.all(width:0.5), // 0.1 to 0.9
              color: Colors.yellow,
              borderRadius: BorderRadius.circular(20.0),
            ),

CodePudding user response:

Container(
  decoration: BoxDecoration(
    border: Border.all(width:0.5), // 0.1 to 0.9
    color: Colors.yellow,
    borderRadius: BorderRadius.circular(20.0),
  ),

  child: SomeOtherWidget()
)
  • Related