getConfig method

Future getConfig(
  1. String url
)

获取配置

Implementation

Future getConfig(String url) async {
  try {
    final res = await Dio().get('$url/files/Config/mobileConfig.json');
    if (res.statusCode == 200) {
      _config = ConfigModel.fromJson(res.data);
    }
  } catch (e, s) {
    CustomToast.showNotificationError(title: 'getConfigFileError'.tr());
    debugPrint('获取配置文件失败, error: $e, stackTrace: $s');
  }
}