flutter - 颤动中的文本方向RTL
问题描述
我想从右到左更改整个应用程序的文本方向
我的主要代码是:
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (context)=>HomeModel(),
child: MaterialApp(
debugShowCheckedModeBanner: false,
home: Directionality(
textDirection:
TextDirection.rtl,
child: FirstScreen()),
));
}
}
但只有第一个屏幕视图是从右到左的,当再次导航到第二页时,它是从左到右的。
解决方案
推荐阅读
- python - 在排序一个列表期间将不同列表中的相关元素保持在一起
- c# - 如何对通用列表对象进行排序
- javascript - 向和从 js 服务器发送数据的基本方法?
- json - 使用 Pyspark 处理 JSON 结构
- amazon-web-services - 为什么角色假设应该在 lambda 内部完成?
- html - 如何将数值绑定到 CSS 以创建时间线?
- docker - 如何为 docker compose 环境变量设置运行时变量
- javascript - 仅在 Javascript 中具有不同段落的动态 Div
- tsql - 表格模型中的测量列未在浏览器中显示正确的值
- javascript - 调用此函数时如何获取返回值?