1
votes

I’ve been working on an application for a couple of months and received a simple design request: Round the corners on a widget and add a drop shadow.

how to do it?

1

1 Answers

6
votes

wrap your widget in DecoratedBox Widget and add BoxDecoration

DecoratedBox(
  decoration: BoxDecoration(
    borderRadius: BorderRadius.circular(10),
    boxShadow: [
      BoxShadow(
        spreadRadius: 4,
        color: Colors.black,
        offset: Offset(2, 2),
        blurRadius: 3,
      )
    ],
  ),
  child: ..
)