Fix: manual checking of directionality (#2063)
* fix: removed manual directionality checking * chore: run before push script --------- Co-authored-by: CatHood0 <santiagowmar@gmail.com>pull/2066/head v10.0.9
parent
522cb3f1d4
commit
493bdbc54d
3 changed files with 4 additions and 29 deletions
@ -1,25 +0,0 @@ |
|||||||
import 'package:flutter/material.dart'; |
|
||||||
import 'package:flutter/widgets.dart'; |
|
||||||
|
|
||||||
bool isRTLLanguage(Locale locale) { |
|
||||||
final rtlLanguages = [ |
|
||||||
'ar', // Arabic |
|
||||||
'dv', // Divehi (Maldivian) |
|
||||||
'fa', // Persian (Farsi) |
|
||||||
'ha', // Hausa (in Ajami script) |
|
||||||
'he', // Hebrew |
|
||||||
'khw', // Khowar (in Arabic script) |
|
||||||
'ks', // Kashmiri (in Arabic script) |
|
||||||
'ku', // Kurdish (Sorani) |
|
||||||
'ps', // Pashto |
|
||||||
'ur', // Urdu |
|
||||||
'yi', // Yiddish |
|
||||||
'sd', // Sindhi |
|
||||||
'ug', // Uyghur |
|
||||||
]; |
|
||||||
return rtlLanguages.contains(locale.languageCode); |
|
||||||
} |
|
||||||
|
|
||||||
bool isRTL(BuildContext context) { |
|
||||||
return isRTLLanguage(Localizations.localeOf(context)); |
|
||||||
} |
|
Loading…
Reference in new issue