在文本字段中的 suffixText 后面显示 suffixIcon
我只想在 suffixText 之后显示 suffixIcon。 现在我知道在 InputDecoration 文档中明确指出它将在 suffixIcon 之前显示 suffixText。
我想要做的是:
'*' 表示它是必填字段。
我得到这个:
有没有办法让我更改我的后缀的顺序文本字段?
我尝试使用 SizedBox 或 Container 小部件,但从未得到我想要的结果。
I just wanted to show the suffixIcon after the suffixText.
Now I know that in the InputDecoration documentation says explicitly that it will show the suffixText before the suffixIcon.
What would I like to do is:
the '*' represents that it's a mandatory field.
And I'm getting this :
is there a way for me to change the order of the suffixes in my TextField?
I tried using SizedBox, or Container widgets but never got the result I wanted.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
(编辑:suffix
suffixIcon
)属性并传入Row
小部件。将这两个元素放入Row
中,您就可以准确决定它们的显示方式。例如:源代码:
You can use
(edit:suffix
suffixIcon
) property and pass in aRow
widget instead. Put both elements in theRow
, and you can decide exactly how you want them to appear. For example:Soure code:
尝试以下代码,使用row()窗口小部件作为suffixicon
您的结果屏幕 - >
Try below code, use Row() widget for suffixIcon
Your result screen->
您可以将 suffixIcon 属性修改为:
此处的对齐方式对于维护非常重要。
You can modify your suffixIcon property to:
The alignments here are important to maintain.