I have a container with image and I wanted to place another small container on top to show an icon on the bottom right of it
Widget buildImage2() {
return Center(
child: Container(
decoration: const BoxDecoration(
color: Colors.black12,
shape: BoxShape.circle,
),
child: ClipOval(
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
showModalBottomSheet(
context: context,
builder: (context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ListTile(
leading: const Icon(Icons.photo),
title: const Text('Gallery'),
onTap: () {
pickImage(ImageSource.gallery);
Navigator.pop(context);
},
),
ListTile(
leading: const Icon(Icons.camera_alt_outlined),
title: const Text('Camera'),
onTap: () {
pickImage(ImageSource.camera);
Navigator.pop(context);
},
),
],
);
});
},
child: Stack(
clipBehavior: Clip.none,
children: [
CachedNetworkImage(
imageUrl: imageURL,
imageBuilder: (context, imageProvider) {
return Ink.image(
image: imageProvider,
fit: BoxFit.cover,
child: Container(
alignment: Alignment.bottomRight,
padding: const EdgeInsets.only(right: 15.0),
width: 160.0,
height: 160.0,
),
);
},
),
Container(
alignment: Alignment.bottomRight,
padding: const EdgeInsets.only(right: 4.0),
width: 150.0,
height: 150.0,
child: Positioned(
child: Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: const Color(0xFF5B84B1),
shape: BoxShape.circle,
border: Border.all(color: Colors.white, width: 3)
),
child: const Icon (Icons.camera_alt, size: 25,
),
),
),
),
],
),
),
),
),
// color: Colors.black12,
),
);
}
But its not giving me the exact behaviour I am looking for. the two containers are placed on top of each other but the small one with the icon is being cutted from the edges as the image shows:
What should I do to fix this?