isDeviceLangaugeArabic static method

bool isDeviceLangaugeArabic(
  1. BuildContext context
)

Implementation

static bool isDeviceLangaugeArabic(BuildContext context ) {
  //see https://stackoverflow.com/a/67622491/7186671
  String deviceLanguage= Platform.localeName.substring(0,2); // return "en"
  bool result =  deviceLanguage == "ar";
  // print("isDeviceLangaugeArabic() - " + deviceLanguage + " /result: " + result.toString() );
  return result;
}