如何解决Flutter在同一应用程序中管理两种语言,一种LTR和另一种RTL
为什么在使用TextField从LTR更改为RTL语言时,BorderRadius不能切换(右变为左,左变为右)? (如BorderRadiusDirectional)
TextField(
decoration: const InputDecoration(
filled: true,fillColor: Colors.white,prefixIcon: const Icon(Icons.search),hintText: 'avocat,dentiste,restaurant,...',enabledBorder: const OutlineInputBorder(
borderSide: const BorderSide(color: Colors.transparent,width: 0),borderRadius: const BorderRadius.only(
bottomLeft: const Radius.circular(8),// I want bottomEnd
topLeft: const Radius.circular(8),// I want topEnd
),),focusedBorder: const OutlineInputBorder(
borderSide: const BorderSide(color: Colors.transparent,
例如,在上面的代码中,我希望在LTR中使用topLeft
和bottomLeft
在RTL中使用topRight
bottomRight
...而无需根据具体情况进行处理
我想要全局管理,因为我在很多地方都有这个问题。具体来说,我想在topEnd
和bottomEnd
处使用边框。但是这最后两个属性不存在。
欢迎使用其他任何方法来实现此目的。谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。