Flutter支持rtl

lmyy7pcs  于 2023-01-27  发布在  Flutter
关注(0)|答案(1)|浏览(136)

我开始在一个大项目上工作,所以我的问题是我能改变列表视图的方向到RTL,

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

bxjv4tth

bxjv4tth1#

您可以指定UI的任何子树的方向:

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

另请参见https://api.flutter.dev/flutter/widgets/Directionality-class.html

相关问题