I'm trying to make a simple container with shadow effect. It is a Opaque container with a box-shadow effect. But i dont think '.withOpacity' and 'boxShadow' work well together. Because every time i add 'boxShadow' to my container it make my container's color change. Here is my code
return Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/background/bg_app_background.png"),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
title: const Text("TEST"),
),
body: SafeArea(
child: Container(
margin:
const EdgeInsets.symmetric(horizontal: 20.0, vertical: 30.0),
alignment: Alignment.center,
width: double.infinity,
height: 200,
decoration: BoxDecoration(
color: const Color(0xFFFFFFFF).withOpacity(0.4),
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
border: Border.all(
color: const Color(0xFFFFFFFF),
width: 1.0,
style: BorderStyle.solid),
boxShadow: <BoxShadow>[
BoxShadow (
color: const Color(0xFF000000).withOpacity(0.16),
offset: const Offset(0.0, 3.0),
blurRadius: 6.0,
//blurStyle: BlurStyle.outer
),
],
),
),
),
),
);
This is what i want

But this is what i receive (it's darker, right?)

Yes i have tried 'blurStyle: BlurStyle.outer' but it make my container's border look so bad

Is there any way to make Opacity and BoxShadow work together?
