Arguments.fromJson constructor

Arguments.fromJson(
  1. Map<String, dynamic> json, {
  2. required Variables variables,
})

Creates an instance of Arguments from a JSON object.

json - The JSON object containing the argument values.

Implementation

factory Arguments.fromJson(
  Map<String, dynamic> json, {
  required Variables variables,
}) {
  return Arguments(
    variables,
    binaryType: json['binary-type'] ?? "apk",
    splitPerAbi: json['split-per-abi'] as bool? ?? false,
    buildMode: json['build-mode'] as String? ?? 'release',
    output:
        json['output'] as String? ?? Files.androidDistributionOutputDir.path,
    target: json['target'] as String?,
    flavor: json['flavor'] as String?,
    buildName: json['build-name'] as String?,
    buildNumber: json['build-number']?.toString(),
    pub: json['pub'] as bool? ?? true,
    dartDefines: json['dart-defines'] as String?,
    dartDefinesFile: json['dart-defines-file'] as String?,
    customArgs: (json['arguments'] as List<dynamic>?)?.cast<String>(),
    generateDebugSymbols: json['generate-debug-symbols'] as bool? ?? true,
    configOnly: json['config-only'] as bool?,
    trackWidgetCreation: json['track-widget-creation'] as bool?,
    androidSkipBuildDependencyValidation:
        json['android-skip-build-dependency-validation'] as bool?,
    analyzeSize: json['analyze-size'] as bool?,
    ignoreDeprecation: json['ignore-deprecation'] as bool?,
    obfuscate: json['obfuscate'] as bool?,
    targetPlatform: json['target-platform'] as String?,
    androidProjectArg: json['android-project-arg'] as String?,
    codeSizeDirectory: json['code-size-directory'] as String?,
    splitDebugInfo: json['split-debug-info'] as String?,
  );
}