fromMap static method
Parsed the config from the map
Implementation
static (BPConfig?, List<(Function(String s), String)>) fromMap(
yaml.YamlMap data,
List<String> args,
String version,
String buildVersion,
) {
yaml.YamlMap platforms = data["platforms"] ?? yaml.YamlMap();
(PlatformConfig?, List<(Function(String s), String)>) android = PlatformConfig.fromMap(platforms, TargetPlatform.android, "android");
(PlatformConfig?, List<(Function(String s), String)>) iOS = PlatformConfig.fromMap(platforms, TargetPlatform.ios, "ios");
(PlatformConfig?, List<(Function(String s), String)>) macos = PlatformConfig.fromMap(platforms, TargetPlatform.macos, "macos");
(PlatformConfig?, List<(Function(String s), String)>) linux = PlatformConfig.fromMap(platforms, TargetPlatform.linux, "linux");
(PlatformConfig?, List<(Function(String s), String)>) windows = PlatformConfig.fromMap(platforms, TargetPlatform.windows, "windows");
(PlatformConfig?, List<(Function(String s), String)>) web = PlatformConfig.fromMap(platforms, TargetPlatform.web, "web");
return (
BPConfig(
android: android.$1,
ios: iOS.$1,
macos: macos.$1,
linux: linux.$1,
windows: windows.$1,
web: web.$1,
xcodeDerivedKey: data["xcode_derived_data_path_env_key"],
cleanFlutter: data["clean_flutter"] ?? true,
generateLog: data["generate_log"] ?? true,
printstdout: data["print_stdout"] ?? false,
preBuildCommand: data["pre_build_command"],
postBuildCommand: data["post_build_command"],
timestamp: DateTime.now(),
version: version,
buildVersion: buildVersion,
cmdArgs: args,
),
[...android.$2, ...iOS.$2, ...macos.$2, ...linux.$2, ...windows.$2, ...web.$2],
);
}