Reputation: 209
I'm trying to place an image a little bit outside of container i used stack and positioned to position the image a little bit outside of container from top, but the part of image that looks like it's gone this is how it looks
and this is how i want it to look like
and this is my code
Column(
children: [
Stack(
fit: StackFit.loose,
clipBehavior: Clip.hardEdge,
children: [
Container(
height: 151.0,
width: 122.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xffFFF0E5),
Color(0xffdeddc2),
Color(0xffa9ceb1),
Color(0xff68bdb9),
Color(0xff30a6ca)
],
),
boxShadow: [
BoxShadow(
color:
Color.fromARGB(255, 234, 246, 250),
spreadRadius: 8,
blurRadius: 7,
offset: Offset(0, 6),
),
],
border: Border.all(
width: 4,
color: Colors.yellow,
),
),
child: Positioned(
top: 75.0,
child: Container(
child: Image.asset(
'assets/images/watch-gt2-listimage-Matte-Black.png',
height: 120.0,
width: 125.0,
),
),
),
),
],
),
],
),
Upvotes: 0
Views: 811
Reputation: 1089
You have to change clipBehavior: Clip.none
in all of its parent widgets like Stack and Container.
Upvotes: 5