Arguments.fromJson constructor
Creates an iOS arguments instance from JSON configuration.
json- JSON object containing iOS build configurationvariables- Variable processor for argument substitution
Returns a new Arguments instance with configuration parsed from the
JSON object. Provides sensible defaults for missing values.
Expected JSON structure:
{
"binary-type": "ipa",
"build-mode": "release",
"export-method": "app-store",
"export-options-plist": "/path/to/ExportOptions.plist"
}
Implementation
factory Arguments.fromJson(
Map<String, dynamic> json, {
required Variables variables,
}) {
return Arguments(
variables,
output: json['output'] as String? ?? Files.iosDistributionOutputDir.path,
binaryType: json['binary-type'] ?? "ipa",
buildMode: json['build-mode'] as String?,
target: json['target'] as String?,
flavor: json['flavor'] as String?,
dartDefines: json['dart-defines'] as String?,
dartDefinesFile: json['dart-defines-file'] as String?,
buildName: json['build-name'] as String?,
buildNumber: json['build-number']?.toString(),
pub: json['pub'] as bool? ?? true,
exportOptionsPlist: json['export-options-plist'] as String?,
exportMethod: json['export-method'] as String?,
customArgs: (json['arguments'] as List<dynamic>?)?.cast<String>(),
);
}