【发布时间】:2021-10-02 07:29:13
【问题描述】:
我在 Flutter 中使用 GetX 启动了一个应用程序。我想创建一个 rtl 应用程序,我使用 flutter_localizations 包作为 this post 。
这是我的 main() 代码
void main() => runApp(
GetMaterialApp(
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
Locale('fa', 'IR'),
],
locale: Locale('fa', 'IR'),
home: HomeScreen(),
),
);
这是我的主屏幕代码
return Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
child: Text(
"Some Text",
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
);
正如您在这张图片中看到的那样,调试横幅已移至左侧,但文本钢在左侧
【问题讨论】:
标签: flutter localization right-to-left flutter-getx