i have one black border container. when this container move only its move on white container if move grey container and stop and again move when black border container on grey container that time not move border container.
child: Stack(
children: [
Positioned(
left: _position.dx,
top: _position.dy,
child: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
color: Colors.grey,
child: Padding(
padding: EdgeInsets.only(left: 20, right: 20, top : 100, bottom: 230 ),
child: PhotoView.customChild(
minScale: PhotoViewComputedScale.contained,
maxScale: PhotoViewComputedScale.covered * 2,
initialScale: PhotoViewComputedScale.contained,
backgroundDecoration: BoxDecoration(color: Colors.grey),
child: Stack(
clipBehavior: Clip.none,
children: [
Center(
child: AspectRatio(
aspectRatio: 5 / 7,
child: Container(
color: Colors.white,
),
),
),
Transform.translate(
offset: position, // Using the updated position variable
child: GestureDetector(
onPanUpdate: (details) {
setState(() {
position += details.delta;
print("position =${position}");
});
},
child: Container(
width: 200,
height: 200,
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
),
),
),
),
)
],
),
),
),
),
),
],
),
how to solve this?