I have these containers to select some images. When the user selects the image it covers the whole container so I want the child (ICONS) to be transparent after the image is selected.
InkWell(
onTap: () async {
XFile? image3 = await _picker.pickImage(
source: ImageSource.gallery);
if (image3 == null) {
debugPrint("got null");
return;
}
final image =
Image.memory(await image3.readAsBytes());
decorationImage3 = DecorationImage(
fit: BoxFit.cover,
image: image.image,
);
setState(() {});
},
child: Container(
height: MediaQuery.of(context).size.width / 4 - 25,
width: MediaQuery.of(context).size.width / 4 - 25,
decoration: BoxDecoration(
color: Colors.blue.shade900,
borderRadius: BorderRadius.circular(5),
image: decorationImage3,
),
child: const Icon(Icons.add, color: Colors.white),
),
),