FLUTTER ECOSYSTEM

AhmedAlYousif/auto_direction

此 Flutter 套件根據所提供的文字語言,將組件方向從左至右(LTR)變為右至左(RTL),反之亦然。

auto_direction 專案封面
Stars
21
Forks
23
最近推送(UTC)
2023年11月10日
專案狀態
已封存
Ahmed Al Yousif GitHub avatar
GITHUB User

Ahmed Al Yousif ↗

語言C++CMakeDartHTMLCSwiftObjective-CShellJavaKotlin

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • intl^0.18.1
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

auto_direction

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

Getting Started

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