FLUTTER ECOSYSTEM

AhmedAlYousif/auto_direction

This flutter package changes the direction of a widget from ltr direction into rtl direction and vice versa based on the language of the text provided.

auto_direction project cover
Stars
21
Forks
23
Last push (UTC)
Nov 10, 2023
Project status
Archived
Ahmed Al Yousif GitHub avatar
GITHUB User

Ahmed Al Yousif ↗

LanguagesC++CMakeDartHTMLCSwiftObjective-CShellJavaKotlin

Technical topics

Packages published by this repository

Dependencies used

Dependency list 3 items
  • flutter{"sdk":"flutter"}
  • intl^0.18.1
  • flutter_testDevelopment{"sdk":"flutter"}

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project 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;
      });
    },
  ),
)