Committed by
GitHub
Merge pull request #645 from justkawal/master
Fix of Issue #643
Showing
3 changed files
with
325 additions
and
2 deletions
example/pubspec.lock
0 → 100644
1 | +# Generated by pub | ||
2 | +# See https://dart.dev/tools/pub/glossary#lockfile | ||
3 | +packages: | ||
4 | + async: | ||
5 | + dependency: transitive | ||
6 | + description: | ||
7 | + name: async | ||
8 | + url: "https://pub.dartlang.org" | ||
9 | + source: hosted | ||
10 | + version: "2.4.2" | ||
11 | + boolean_selector: | ||
12 | + dependency: transitive | ||
13 | + description: | ||
14 | + name: boolean_selector | ||
15 | + url: "https://pub.dartlang.org" | ||
16 | + source: hosted | ||
17 | + version: "2.0.0" | ||
18 | + characters: | ||
19 | + dependency: transitive | ||
20 | + description: | ||
21 | + name: characters | ||
22 | + url: "https://pub.dartlang.org" | ||
23 | + source: hosted | ||
24 | + version: "1.0.0" | ||
25 | + charcode: | ||
26 | + dependency: transitive | ||
27 | + description: | ||
28 | + name: charcode | ||
29 | + url: "https://pub.dartlang.org" | ||
30 | + source: hosted | ||
31 | + version: "1.1.3" | ||
32 | + clock: | ||
33 | + dependency: transitive | ||
34 | + description: | ||
35 | + name: clock | ||
36 | + url: "https://pub.dartlang.org" | ||
37 | + source: hosted | ||
38 | + version: "1.0.1" | ||
39 | + collection: | ||
40 | + dependency: transitive | ||
41 | + description: | ||
42 | + name: collection | ||
43 | + url: "https://pub.dartlang.org" | ||
44 | + source: hosted | ||
45 | + version: "1.14.13" | ||
46 | + dio: | ||
47 | + dependency: "direct main" | ||
48 | + description: | ||
49 | + name: dio | ||
50 | + url: "https://pub.dartlang.org" | ||
51 | + source: hosted | ||
52 | + version: "3.0.10" | ||
53 | + fake_async: | ||
54 | + dependency: transitive | ||
55 | + description: | ||
56 | + name: fake_async | ||
57 | + url: "https://pub.dartlang.org" | ||
58 | + source: hosted | ||
59 | + version: "1.1.0" | ||
60 | + flutter: | ||
61 | + dependency: "direct main" | ||
62 | + description: flutter | ||
63 | + source: sdk | ||
64 | + version: "0.0.0" | ||
65 | + flutter_test: | ||
66 | + dependency: "direct dev" | ||
67 | + description: flutter | ||
68 | + source: sdk | ||
69 | + version: "0.0.0" | ||
70 | + get: | ||
71 | + dependency: "direct main" | ||
72 | + description: | ||
73 | + path: ".." | ||
74 | + relative: true | ||
75 | + source: path | ||
76 | + version: "3.10.2" | ||
77 | + http_parser: | ||
78 | + dependency: transitive | ||
79 | + description: | ||
80 | + name: http_parser | ||
81 | + url: "https://pub.dartlang.org" | ||
82 | + source: hosted | ||
83 | + version: "3.1.4" | ||
84 | + matcher: | ||
85 | + dependency: transitive | ||
86 | + description: | ||
87 | + name: matcher | ||
88 | + url: "https://pub.dartlang.org" | ||
89 | + source: hosted | ||
90 | + version: "0.12.8" | ||
91 | + meta: | ||
92 | + dependency: transitive | ||
93 | + description: | ||
94 | + name: meta | ||
95 | + url: "https://pub.dartlang.org" | ||
96 | + source: hosted | ||
97 | + version: "1.1.8" | ||
98 | + path: | ||
99 | + dependency: transitive | ||
100 | + description: | ||
101 | + name: path | ||
102 | + url: "https://pub.dartlang.org" | ||
103 | + source: hosted | ||
104 | + version: "1.7.0" | ||
105 | + sky_engine: | ||
106 | + dependency: transitive | ||
107 | + description: flutter | ||
108 | + source: sdk | ||
109 | + version: "0.0.99" | ||
110 | + source_span: | ||
111 | + dependency: transitive | ||
112 | + description: | ||
113 | + name: source_span | ||
114 | + url: "https://pub.dartlang.org" | ||
115 | + source: hosted | ||
116 | + version: "1.7.0" | ||
117 | + stack_trace: | ||
118 | + dependency: transitive | ||
119 | + description: | ||
120 | + name: stack_trace | ||
121 | + url: "https://pub.dartlang.org" | ||
122 | + source: hosted | ||
123 | + version: "1.9.5" | ||
124 | + stream_channel: | ||
125 | + dependency: transitive | ||
126 | + description: | ||
127 | + name: stream_channel | ||
128 | + url: "https://pub.dartlang.org" | ||
129 | + source: hosted | ||
130 | + version: "2.0.0" | ||
131 | + string_scanner: | ||
132 | + dependency: transitive | ||
133 | + description: | ||
134 | + name: string_scanner | ||
135 | + url: "https://pub.dartlang.org" | ||
136 | + source: hosted | ||
137 | + version: "1.0.5" | ||
138 | + term_glyph: | ||
139 | + dependency: transitive | ||
140 | + description: | ||
141 | + name: term_glyph | ||
142 | + url: "https://pub.dartlang.org" | ||
143 | + source: hosted | ||
144 | + version: "1.1.0" | ||
145 | + test_api: | ||
146 | + dependency: transitive | ||
147 | + description: | ||
148 | + name: test_api | ||
149 | + url: "https://pub.dartlang.org" | ||
150 | + source: hosted | ||
151 | + version: "0.2.17" | ||
152 | + typed_data: | ||
153 | + dependency: transitive | ||
154 | + description: | ||
155 | + name: typed_data | ||
156 | + url: "https://pub.dartlang.org" | ||
157 | + source: hosted | ||
158 | + version: "1.2.0" | ||
159 | + vector_math: | ||
160 | + dependency: transitive | ||
161 | + description: | ||
162 | + name: vector_math | ||
163 | + url: "https://pub.dartlang.org" | ||
164 | + source: hosted | ||
165 | + version: "2.0.8" | ||
166 | +sdks: | ||
167 | + dart: ">=2.9.0-14.0.dev <3.0.0" |
@@ -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) | 236 | + textDirection: textDirection ?? |
237 | + (rtlLanguages.contains(Get.locale?.languageCode) | ||
235 | ? TextDirection.rtl | 238 | ? TextDirection.rtl |
236 | - : TextDirection.ltr, | 239 | + : TextDirection.ltr), |
237 | child: builder == null ? child : builder(context, child), | 240 | child: builder == null ? child : builder(context, child), |
238 | ); | 241 | ); |
239 | }, | 242 | }, |
pubspec.lock
0 → 100644
1 | +# Generated by pub | ||
2 | +# See https://dart.dev/tools/pub/glossary#lockfile | ||
3 | +packages: | ||
4 | + async: | ||
5 | + dependency: transitive | ||
6 | + description: | ||
7 | + name: async | ||
8 | + url: "https://pub.dartlang.org" | ||
9 | + source: hosted | ||
10 | + version: "2.4.2" | ||
11 | + boolean_selector: | ||
12 | + dependency: transitive | ||
13 | + description: | ||
14 | + name: boolean_selector | ||
15 | + url: "https://pub.dartlang.org" | ||
16 | + source: hosted | ||
17 | + version: "2.0.0" | ||
18 | + characters: | ||
19 | + dependency: transitive | ||
20 | + description: | ||
21 | + name: characters | ||
22 | + url: "https://pub.dartlang.org" | ||
23 | + source: hosted | ||
24 | + version: "1.0.0" | ||
25 | + charcode: | ||
26 | + dependency: transitive | ||
27 | + description: | ||
28 | + name: charcode | ||
29 | + url: "https://pub.dartlang.org" | ||
30 | + source: hosted | ||
31 | + version: "1.1.3" | ||
32 | + clock: | ||
33 | + dependency: transitive | ||
34 | + description: | ||
35 | + name: clock | ||
36 | + url: "https://pub.dartlang.org" | ||
37 | + source: hosted | ||
38 | + version: "1.0.1" | ||
39 | + collection: | ||
40 | + dependency: transitive | ||
41 | + description: | ||
42 | + name: collection | ||
43 | + url: "https://pub.dartlang.org" | ||
44 | + source: hosted | ||
45 | + version: "1.14.13" | ||
46 | + effective_dart: | ||
47 | + dependency: "direct dev" | ||
48 | + description: | ||
49 | + name: effective_dart | ||
50 | + url: "https://pub.dartlang.org" | ||
51 | + source: hosted | ||
52 | + version: "1.2.4" | ||
53 | + fake_async: | ||
54 | + dependency: transitive | ||
55 | + description: | ||
56 | + name: fake_async | ||
57 | + url: "https://pub.dartlang.org" | ||
58 | + source: hosted | ||
59 | + version: "1.1.0" | ||
60 | + flutter: | ||
61 | + dependency: "direct main" | ||
62 | + description: flutter | ||
63 | + source: sdk | ||
64 | + version: "0.0.0" | ||
65 | + flutter_test: | ||
66 | + dependency: "direct dev" | ||
67 | + description: flutter | ||
68 | + source: sdk | ||
69 | + version: "0.0.0" | ||
70 | + matcher: | ||
71 | + dependency: transitive | ||
72 | + description: | ||
73 | + name: matcher | ||
74 | + url: "https://pub.dartlang.org" | ||
75 | + source: hosted | ||
76 | + version: "0.12.8" | ||
77 | + meta: | ||
78 | + dependency: transitive | ||
79 | + description: | ||
80 | + name: meta | ||
81 | + url: "https://pub.dartlang.org" | ||
82 | + source: hosted | ||
83 | + version: "1.1.8" | ||
84 | + path: | ||
85 | + dependency: transitive | ||
86 | + description: | ||
87 | + name: path | ||
88 | + url: "https://pub.dartlang.org" | ||
89 | + source: hosted | ||
90 | + version: "1.7.0" | ||
91 | + sky_engine: | ||
92 | + dependency: transitive | ||
93 | + description: flutter | ||
94 | + source: sdk | ||
95 | + version: "0.0.99" | ||
96 | + source_span: | ||
97 | + dependency: transitive | ||
98 | + description: | ||
99 | + name: source_span | ||
100 | + url: "https://pub.dartlang.org" | ||
101 | + source: hosted | ||
102 | + version: "1.7.0" | ||
103 | + stack_trace: | ||
104 | + dependency: transitive | ||
105 | + description: | ||
106 | + name: stack_trace | ||
107 | + url: "https://pub.dartlang.org" | ||
108 | + source: hosted | ||
109 | + version: "1.9.5" | ||
110 | + stream_channel: | ||
111 | + dependency: transitive | ||
112 | + description: | ||
113 | + name: stream_channel | ||
114 | + url: "https://pub.dartlang.org" | ||
115 | + source: hosted | ||
116 | + version: "2.0.0" | ||
117 | + string_scanner: | ||
118 | + dependency: transitive | ||
119 | + description: | ||
120 | + name: string_scanner | ||
121 | + url: "https://pub.dartlang.org" | ||
122 | + source: hosted | ||
123 | + version: "1.0.5" | ||
124 | + term_glyph: | ||
125 | + dependency: transitive | ||
126 | + description: | ||
127 | + name: term_glyph | ||
128 | + url: "https://pub.dartlang.org" | ||
129 | + source: hosted | ||
130 | + version: "1.1.0" | ||
131 | + test_api: | ||
132 | + dependency: transitive | ||
133 | + description: | ||
134 | + name: test_api | ||
135 | + url: "https://pub.dartlang.org" | ||
136 | + source: hosted | ||
137 | + version: "0.2.17" | ||
138 | + typed_data: | ||
139 | + dependency: transitive | ||
140 | + description: | ||
141 | + name: typed_data | ||
142 | + url: "https://pub.dartlang.org" | ||
143 | + source: hosted | ||
144 | + version: "1.2.0" | ||
145 | + vector_math: | ||
146 | + dependency: transitive | ||
147 | + description: | ||
148 | + name: vector_math | ||
149 | + url: "https://pub.dartlang.org" | ||
150 | + source: hosted | ||
151 | + version: "2.0.8" | ||
152 | +sdks: | ||
153 | + dart: ">=2.9.0-14.0.dev <3.0.0" |
-
Please register or login to post a comment