ReadingProgression.fromLanguage constructor

ReadingProgression.fromLanguage(
  1. String language
)

Creates from a BCP 47 language.

Implementation

factory ReadingProgression.fromLanguage(String language) {
  if (['ar', 'fa', 'he'].contains(language.toLowerCase())) {
    return ReadingProgression.rtl;
  } else {
    return ReadingProgression.ltr;
  }
}