带有表情符号的阿拉伯文字有反向

发布于 2025-02-10 21:45:54 字数 67 浏览 0 评论 0原文

我在阿拉伯文字中有一个奇怪的行为,

即使

Text('Hello 
              

I have a strange behavior in Arabic text with emoji

for example

English

Text('Hello ????') => outputs in UI as expected 'Hello ????'

Arabic

Text('???? الله الرحمن', textAlign: TextAlign.right ) => outputs in UI  'الله الرحمن ???? '

    edit
    in case the following i can get result as expected 
        Text('الله اكبر ???? الله الرحمن', textAlign: TextAlign.right ) => outputs in UI  'الله اكبر ???? الله الرحمن'

// but if emoji was at the fist or end so it comes with reverse side

even with removig TextAlign.right still the same behavior

How could i solve this ? i am totally confused

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱花落人离去 2025-02-17 21:45:54

您可以在文本中使用Unicode,而不是直接添加表情符号。

Text('\u{1F600} الله الرحمن', textAlign: TextAlign.right))

您可以搜索表情符号unicode,并使用\ u {codehere} “

编辑

使用文本方向

TextField(
  textDirection: TextDirection.rtl,
),

You can use unicode in text instead of directly adding the emoji.

Text('\u{1F600} الله الرحمن', textAlign: TextAlign.right))

you can search for emoji unicode and use \u{codehere}preview

Edit

Use text Direction

TextField(
  textDirection: TextDirection.rtl,
),
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文