Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I make an image over an image in flutter?

I saw a lot posts about how to do a text into a picture, I tried it and the 2 pictures were like this:
images in flutter

but I want it like this:
how the images in flutter should look like

Can someone post an example?
Im too stupid for dart.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use the Stack widget. It takes a list of widgets as children parameter, being the first one in the back of the stack and the last one in the front.
Set alignment parameter as Alignment.center to obtain the centered result you’re looking for.

Stack(
  alignment: Alignment.center,
  children: [
    Image(...), // Back image
    Image(...), // Front image
  ],
),
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading