NativeBuildStep.fromJson constructor
Deserialize a step from JSON.
Implementation
factory NativeBuildStep.fromJson(Map<String, dynamic> json) {
return switch (json['type'] as String?) {
'cmake_configure' => CmakeConfigureStep.fromMap(json),
'cmake_build' => CmakeBuildStep.fromMap(json),
'export_artifact' => ExportArtifactStep.fromMap(json),
'command' => CommandStep.fromMap(json),
'download_archive' => DownloadArchiveStep.fromMap(json),
'git_checkout' => GitCheckoutStep.fromMap(json),
'git_apply_patch' => GitApplyPatchStep.fromMap(json),
'copy' => CopyStep.fromMap(json),
'strip' => StripStep.fromMap(json),
final type => throw FormatException('Unknown build step type: $type'),
};
}