Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: FloatingActionButton shadow

Are you able or is there a way to change the color of the shadow made by the FloatingActionButton.extended or any other floating button ?

like image 503
Hector Avatar asked Jan 27 '23 16:01

Hector


1 Answers

enter image description here

You can try this way:

floatingActionButton: FloatingActionButton(
      onPressed: () {},
      backgroundColor: Colors.red,
      elevation: 0,
      child: Container(
        decoration: BoxDecoration(
          color: Colors.transparent,
          borderRadius: BorderRadius.all(
            Radius.circular(100),
          ),
          boxShadow: [
            BoxShadow(
              color: Colors.purple.withOpacity(0.3),
              spreadRadius: 7,
              blurRadius: 7,
              offset: Offset(3, 5),
            ),
          ],
        ),
      ),
    ),
like image 104
Samet Karavaizoğlu Avatar answered Jan 30 '23 07:01

Samet Karavaizoğlu