getBuildConfig method
Implementation
Future<BuildConfig> getBuildConfig() async {
if (!await File(filePath).exists()) {
logger.log('$filePath路径不存在!', status: LogStatus.error);
exit(2);
}
final buildConfigText = await File(filePath).readAsString();
final buildConfigJson = JSON(buildConfigText);
final buildConfig = BuildConfig.fromJson(buildConfigJson.mapValue
.map((key, value) => MapEntry(key.toString(), value)));
return buildConfig;
}