What you want to do should be simple enough, you just need to make sure to set the contentPadding
property of the AlertDialog
to zero, and use a stack.
I'd also advise using a Positioned around your image so that it doesn't dictate the size of the dialog, or otherwise the dialog might just grow to as big as possible for the screen. Doing it this way ensures that the dialog will be sized to the other child (your actual content) instead.
showDialog(
context: context,
builder: (context) {
return AlertDialog(
backgroundColor: Colors.red,
content: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Image.network(
"https://images.unsplash.com/photo-1596117803277-6142bb2ae8ef?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2364&q=80",
fit: BoxFit.cover,
),
),
Padding(
padding: EdgeInsets.all(24),
child: Container(
height: 400,
width: 240,
color: Colors.white.withOpacity(.3),
),
)
],
),
contentPadding: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
);
},
);