color with transparency flutter code example
Example 1: flutter how to add opacity to color
backgroundColor: Colors.black.withOpacity(0.5)
Example 2: opacity color flutter
Color(0xFF0E3311).withOpacity(0.5)
Example 3: how to set opacity of background color in flutter
Opacity(
opacity: 0.5,
child: Container(
color: Colors.red,
width: 200,
height: 200,
),
),