toJson method
Serializes Arguments instance to JSON format.
Converts all configuration parameters to a JSON-serializable map for storage, transmission, or configuration file generation. Handles proper formatting of arrays and optional values.
Returns map containing all configuration parameters with their current values. Arrays are joined with commas, null values are preserved for proper deserialization.
Example output:
{
"file-path": "/path/to/app.aab",
"binary-type": "aab",
"track": "production",
"upload-debug-symbols": true
}
Implementation
@override
Map<String, dynamic> toJson() => {
'file-path': filePath,
'binary-type': binaryType,
'version-name': versionName,
'version-code': versionCode,
'release-status': releaseStatus,
'track': track,
'rollout': rollout,
'metadata-path': metadataPath,
'json-key': jsonKey,
'json-key-data': jsonKeyData,
'apk': apk,
'apk-paths': apkPaths?.join(","),
'aab': aab,
'aab-paths': aabPaths?.join(","),
'skip-upload-apk': skipUploadApk,
'skip-upload-aab': skipUploadAab,
'skip-upload-metadata': skipUploadMetadata,
'skip-upload-changelogs': skipUploadChangelogs,
'skip-upload-images': skipUploadImages,
'skip-upload-screenshots': skipUploadScreenshots,
'sync-image-upload': syncImageUpload,
'track-promote-to': trackPromoteTo,
'track-promote-release-status': trackPromoteReleaseStatus,
'validate-only': validateOnly,
'mapping': mapping,
'mapping-paths': mappingPaths?.join(","),
'root-url': rootUrl,
'timeout': timeout,
'version-codes-to-retain': versionCodesToRetain,
'changes-not-sent-for-review': changesNotSentForReview,
'rescue-changes-not-sent-for-review': rescueChangesNotSentForReview,
'in-app-update-priority': inAppUpdatePriority,
'obb-main-references-version': obbMainReferencesVersion,
'obb-main-file-size': obbMainFileSize,
'obb-patch-references-version': obbPatchReferencesVersion,
'obb-patch-file-size': obbPatchFileSize,
'ack-bundle-installation-warning': ackBundleInstallationWarning,
'upload-debug-symbols': uploadDebugSymbols,
};