Flutter: FloatingActionButton shadow

4,757

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),
            ),
          ],
        ),
      ),
    ),
Share:
4,757
Hector
Author by

Hector

Currently learning more about Dart, Flutter and Firebase. if(fail){ LearnFromIt() } else { LearnMore() }

Updated on December 06, 2022

Comments

  • Hector
    Hector over 1 year

    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 ?