user3903484
user3903484

Reputation: 934

Flutter support rtl

I am starting to work on one big project, So my question is can I change the direction of the listview to RTL,

new ListTile(
      trailing: new Icon(Icons.keyboard_arrow_right),
      onTap: onTab,
      leading: new Icon(Icons.account_circle),
      title: new Text("Test"),
    );

enter image description here

Upvotes: 9

Views: 4368

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657308

You can specify the direction for any subtree of the UI:

new Directionality(textDirection: TextDirection.rtl, 
    child: new ListTile(...))

See also https://api.flutter.dev/flutter/widgets/Directionality-class.html

Upvotes: 27

Related Questions