Showing
1 changed file
with
6 additions
and
3 deletions
@@ -20,6 +20,7 @@ class GetMaterialApp extends StatelessWidget { | @@ -20,6 +20,7 @@ class GetMaterialApp extends StatelessWidget { | ||
20 | this.builder, | 20 | this.builder, |
21 | this.translationsKeys, | 21 | this.translationsKeys, |
22 | this.translations, | 22 | this.translations, |
23 | + this.textDirection, | ||
23 | this.title = '', | 24 | this.title = '', |
24 | this.onGenerateTitle, | 25 | this.onGenerateTitle, |
25 | this.color, | 26 | this.color, |
@@ -84,6 +85,7 @@ class GetMaterialApp extends StatelessWidget { | @@ -84,6 +85,7 @@ class GetMaterialApp extends StatelessWidget { | ||
84 | final Color color; | 85 | final Color color; |
85 | final Map<String, Map<String, String>> translationsKeys; | 86 | final Map<String, Map<String, String>> translationsKeys; |
86 | final Translations translations; | 87 | final Translations translations; |
88 | + final TextDirection textDirection; | ||
87 | final Locale locale; | 89 | final Locale locale; |
88 | final Locale fallbackLocale; | 90 | final Locale fallbackLocale; |
89 | final Iterable<LocalizationsDelegate<dynamic>> localizationsDelegates; | 91 | final Iterable<LocalizationsDelegate<dynamic>> localizationsDelegates; |
@@ -231,9 +233,10 @@ class GetMaterialApp extends StatelessWidget { | @@ -231,9 +233,10 @@ class GetMaterialApp extends StatelessWidget { | ||
231 | ..addAll(navigatorObservers)), | 233 | ..addAll(navigatorObservers)), |
232 | builder: (context, child) { | 234 | builder: (context, child) { |
233 | return Directionality( | 235 | return Directionality( |
234 | - textDirection: rtlLanguages.contains(Get.locale?.languageCode) | ||
235 | - ? TextDirection.rtl | ||
236 | - : TextDirection.ltr, | 236 | + textDirection: textDirection ?? |
237 | + (rtlLanguages.contains(Get.locale?.languageCode) | ||
238 | + ? TextDirection.rtl | ||
239 | + : TextDirection.ltr), | ||
237 | child: builder == null ? child : builder(context, child), | 240 | child: builder == null ? child : builder(context, child), |
238 | ); | 241 | ); |
239 | }, | 242 | }, |
-
Please register or login to post a comment