copyWith method
Creates a copy of this iOS arguments instance with updated values.
data- New iOS arguments to merge with current instance
Returns a new Arguments instance with values from data taking
precedence over current values. Null values in data will preserve
the corresponding values from the current instance.
This method is useful for creating variants of build configurations without modifying the original instance.
Example usage:
final releaseArgs = debugArgs.copyWith(Arguments(
variables,
binaryType: 'ipa',
buildMode: 'release',
exportMethod: 'app-store',
));
Implementation
Arguments copyWith(Arguments? data) {
return Arguments(
data?.variables ?? variables,
buildMode: data?.buildMode ?? buildMode,
binaryType: data?.binaryType ?? binaryType,
flavor: data?.flavor ?? flavor,
dartDefines: data?.dartDefines ?? dartDefines,
dartDefinesFile: data?.dartDefinesFile ?? dartDefinesFile,
customArgs: data?.customArgs ?? customArgs,
target: data?.target ?? target,
buildName: data?.buildName ?? buildName,
buildNumber: data?.buildNumber ?? buildNumber,
pub: data?.pub ?? pub,
exportOptionsPlist: data?.exportOptionsPlist ?? exportOptionsPlist,
exportMethod: data?.exportMethod ?? exportMethod,
output: data?.output ?? output,
);
}