Home > Software engineering >  Flutter transparent black color
Flutter transparent black color

Time:07-17

How to make transparent black color in flutter like the background color of icon’s in the picture below

enter image description here

CodePudding user response:

Wrap the icon with a container and add color to it

InkWell(
onTap: (){},
Container(
  padding: EdgeInsets.all(7),
   child : Icon(Icons.mute),
  color: Colors.black.withOpacity(0.5)
  )
)

CodePudding user response:

use this

color:Colors.transparent,

if you use Card Widget you need to make elevation zero

like this

elevation: 0,
color: Colors.transparent,

or if you want to reduce opacity of colors you can use

Colors.black.withOpcaity(.5)
  • Related