Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 682 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 682 Bytes

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