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.
CodePudding user response:
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
],
),
CodePudding user response:
you should use Stack its a Widget
widget of the week => https://www.youtube.com/watch?v=liEGSeD3Zt8
api docs => https://api.flutter.dev/flutter/widgets/Stack-class.html
