gpt4 book ai didi

internationalization - 在 Flutter 应用程序中使用英里还是公里?

转载 作者:IT王子 更新时间:2023-10-29 07:05:50 26 4
gpt4 key购买 nike

问候 Flutter 开发人员,

我正在编写一个国际化的应用程序,并尝试根据语言环境确定是使用英里还是公里。目前我只能从 locale 数据结构中看到国家和语言。有没有办法确定应用应该使用英里还是公里?

谢谢!

詹姆斯

最佳答案

https://docs.flutter.io/flutter/widgets/MediaQueryData/alwaysUse24HourFormat.html

Whether to use 24-hour format when formatting time.

The behavior of this flag is different across platforms:

  • On Android this flag is reported directly from the user settings called "Use 24-hour format". It applies to any locale used by the application, whether it is the system-wide locale, or the custom locale set by the application.
  • On iOS this flag is set to true when the user setting called "24-Hour Time" is set or the system-wide locale's default uses 24-hour formatting.

另见 https://docs.flutter.io/flutter/widgets/MediaQuery-class.html

关于internationalization - 在 Flutter 应用程序中使用英里还是公里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53052691/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com