I want to put the Image on the edge of the container in flutter
As in shown in image
2
Use a stack widget where the children of the stack would be the container and the image wrapped in a positioned widget.
Stack( clipBehavior: Clip.none, children: [ Container( height: 200, decoration: BoxDecoration( color: Colors.grey.shade400, borderRadius: BorderRadius.circular(30), ), ), Positioned( top: 135, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Image.network( "https://pngimg.com/uploads/mercedes/mercedes_PNG80135.png", height: 125, ), const SizedBox(width: 30,), FloatingActionButton( onPressed: (){}, backgroundColor: Colors.white, child: const Icon(Icons.arrow_forward,color: Colors.black,), ), ], ), ), ) ], ),
Click here to cancel reply.
2
Answers
Use a stack widget where the children of the stack would be the container and the image wrapped in a positioned widget.