Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 797
user3903484 Avatar asked Apr 22 '18 07:04

user3903484


People also ask

What is RTL in flutter?

9 Sep 20218 minutes to read. SfDataGrid supports right-to-left rendering. The columns will be rendered based on LTR and RTL direction.

How do you change the RTL in flutter?

In the Flutter Event Calendar widget, you can change the working directions (RTL and LTR) of the flutter calendar by using the `Directionality` widget. Use `Directionality` widget inside the body of the Scaffold. And then, use `textDirection` property for changing the directionality of the calendar.


1 Answers

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

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

See also https://docs.flutter.io/flutter/widgets/Directionality-class.html

like image 165
Günter Zöchbauer Avatar answered Oct 05 '22 11:10

Günter Zöchbauer