79180787

Date: 2024-11-12 10:58:06
Score: 1
Natty:
Report link

The border is always inner. So you can just add an opaque white border that fades out the background color like so:

Container(
  width: 200,
  height: 200,
  decoration: BoxDecoration(
    color: Colors.green,
    border: Border.all(
      color: Colors.white.withOpacity(0.5),
      width: 4,
    ),
    borderRadius: BorderRadius.circular(20),
  ),
),

Result:

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Lostsaka