首页 > 解决方案 > 颤动中的文本方向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()),
      
          ));
        }

  }

但只有第一个屏幕视图是从右到左的,当再次导航到第二页时,它是从左到右的。

标签: flutter

解决方案


推荐阅读