getCurrentLanguage method

Language getCurrentLanguage([
  1. BuildContext? context
])

Implementation

Language getCurrentLanguage([BuildContext? context]) {
  if (null == _selectLanguage) {
    _selectLanguage = SpUtil.getObj(BaseConfig.keyLanguageJson, (Map v) => Language.fromJson(v as Map<String, dynamic>));
    _selectLanguage ??= getLanguages()[0];
  }
  return _selectLanguage!;
}