v0.0.7auto_direction
此包根据提供的文本语言,将小部件的方向从从左到右(LTR)更改为从右到左(RTL),反之亦然。
88喜欢 214近 30 天下载140Pub 分数
AndroidiOSWebmacOSWindowsLinux
此 Flutter 包根据提供的文本的语言,将小部件的方向从左到右(LTR)更改为右到左(RTL),反之亦然。
{"sdk":"flutter"}^0.18.1{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
This widget changes the direction of a widget from ltr direction into rtl direction and vice versa based on the language of the text provided.
Auto RTL on a TextField
This widget will wrap its child with a Directionality widget and it will decide the direction based on the provided text.
...
String text = "";
...
AutoDirection(
text: text,
child: TextField(
onChanged: (str){
setState(() {
text = str;
});
},
),
)