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;
});
},
),
)