I tried align top right the image, but that dosen't work, also I tried to do the positioned widget that also didn't work
Column(
children: [
Image.asset(
'assets/design_el_1.png',
alignment: Alignment.topRight
),
other elements
other elements
other elements
]
);
how can I align the image to top right of the screen?
i want to align the lite purple element
CodePudding user response:
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Image.asset(
'assets/images/onboard.jpeg',
width: 200,
height: 100,
),
],
),
],
)
Output:
CodePudding user response:
you have to use Align Widget like the code given below
Align(
alignment: Alignment.topRight,
child: Image.asset("Assets/user.png"))
CodePudding user response:
Wrap your Image.asset
with Align
widget and use it's alignment: Alignment.centerRight
property. Your image will surely align right side.
Align(
alignment: Alignment.centerRight,
child: Image.asset("Assets/user.png"))
P.S :- You may use your asset image instead of my image :)