Answers for "flutter add boxShadow"

6

Flutter - BoxShadow Widget

Container(
                decoration: BoxDecoration(
                  boxShadow: [
                    BoxShadow(
                      color: Colors.grey.withOpacity(0.4),
                      spreadRadius: 2,
                      blurRadius: 8,
                    ),
                  ],
                ),
               ),
Posted by: Guest on September-01-2021
1

how to add box shadow in flutter

new Container(
    height: 200.0,
    decoration: new BoxDecoration(
        boxShadow: [
          color: Colors.white, //background color of box
          BoxShadow(
            color: Colors.red,
            blurRadius: 25.0, // soften the shadow
            spreadRadius: 5.0, //extend the shadow
            offset: Offset(
              15.0, // Move to right 10  horizontally
              15.0, // Move to bottom 10 Vertically
            ),
          )
        ],
    ),
    child: new Text("Hello world"),
);
Posted by: Guest on July-17-2020

Browse Popular Code Answers by Language