I'm trying to make a circular border within a PhysicalModel. It works if I don't wrap my widget in a PhysicalModel, but once I do, I get a square-ish border.
new PhysicalModel(
color: Colors.green,
child: new Container(
width: 50.0,
height: 50.0,
decoration: new BoxDecoration(
borderRadius: new BorderRadius.circular(25.0),
border: new Border.all(
width: 5.0,
color: Colors.red,
),
),
),
),
To set border radius for Container widget, set its decoration property with BoxDecoration where the borderRadius property is set with required value.
To make a container border circular at a selected corner. topRight: Radius. circular(40.0), bottomRight: Radius.
You can just add the shape - circle
PhysicalModel(
shape: BoxShape.circle, //Here
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With