Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/src/tiles/platforms/ios_settings_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ class IOSSettingsTileState extends State<IOSSettingsTile> {
data: IconTheme.of(context)
.copyWith(color: theme.themeData.leadingIconsColor),
child: Icon(
CupertinoIcons.chevron_forward,
PlatformUtils.languageIsRTL(context)
? CupertinoIcons.chevron_back
: CupertinoIcons.chevron_forward,
size: 18 * scaleFactor,
),
),
Expand Down
20 changes: 20 additions & 0 deletions lib/src/utils/platform_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,24 @@ class PlatformUtils {
return DevicePlatform.windows;
}
}

static bool languageIsRTL(BuildContext context) {
const rtlLanguages = [
"ar",
"arc",
"dv",
"fa",
"ha",
"he",
"khw",
"ks",
"ku",
"ps",
"ur",
"yi"
];
final language = Localizations.localeOf(context).languageCode.toLowerCase();

return rtlLanguages.contains(language);
}
}