getLangData method

Future<String> getLangData()

endregion 获取语言数据

Implementation

/// 获取语言数据
Future<String> getLangData() async {
  if (_langData?.isNotEmptyString ?? false) {
    return Future.value(_langData ?? "");
  }
  var configLang = _getCacheConfigLang();
  if (configLang?.unique.isEmptyString ?? true) {
    return Future.value("");
  }
  var appKey = EyFlutter.instance.appConfig?.appKey ?? "";
  var data = await MmkvUtils.instance.getString("${appKey}_${configLang?.unique}");
  _langData = Uri.decodeFull(data ?? "");
  return Future.value(_langData);
}