We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44fd334 commit bc6fbeeCopy full SHA for bc6fbee
lib/src/utils/platform_utils.dart
@@ -49,3 +49,23 @@ class PlatformUtils {
49
}
50
51
52
+static bool languageIsRTL(BuildContext context) {
53
+ const rtlLanguages = [
54
+ "ar",
55
+ "arc",
56
+ "dv",
57
+ "fa",
58
+ "ha",
59
+ "he",
60
+ "khw",
61
+ "ks",
62
+ "ku",
63
+ "ps",
64
+ "ur",
65
+ "yi"
66
+ ];
67
+ final language = Localizations.localeOf(context).languageCode.toLowerCase();
68
+
69
+ return rtlLanguages.contains(language);
70
+ }
71
+}
0 commit comments