如何约束颤动中的项目位置?
我尝试制作一个小部件列表。它看起来像这样:
我知道 flutter 中没有约束布局之类的东西。但我需要一些东西将我的箭头图标放置在右侧的固定位置。简而言之,这是我的小部件代码:
Row(
children:[
SizedBox(),
Column(),//this is all the item on the left
Spacer(),
Expanded(// this is the heart and arrow button
child: Column()
)
]
)
我注意到,如果左侧的列太宽,我的箭头和心形图标就会移出直线。
如何将我的图标放在右侧的固定位置?
I try to make a list of widget. It look like this:
I know of no such thing as Constraint Layout in flutter. But I need something to position my arrow icon in a fixed position on the right. To put it simple, this is my widget code:
Row(
children:[
SizedBox(),
Column(),//this is all the item on the left
Spacer(),
Expanded(// this is the heart and arrow button
child: Column()
)
]
)
I notice that if my column on the left get too wide, my arrow and heart icon is shifted out of line.
How to put my icon in fixed position to the right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里尝试一下,您必须与扩展的中间列包裹中间列,以便将最大可用空间
here try this, You have to wrap middle column with expanded so it will take the maximum space available