PrebuiltManifest class final

A complete manifest of prebuilt native artifacts for a single package.

This is the central data structure that replaces the separate artifacts.dart and asset_hashes.dart files. It contains everything needed to download, verify, and install prebuilt binaries.

Instances should be declared as top-level const values, typically generated by the native_prebuilt manifest update CLI command.

const myPrebuilts = PrebuiltManifest(
  schemaVersion: 1,
  release: GitHubReleaseSource(
    owner: 'myorg',
    repository: 'myrepo',
    tag: 'mylib-v1.0.0',
  ),
  // or GitLabReleaseSource(projectPath: 'mygroup/myrepo', tag: ...)
  artifacts: {
    'linux-x64': PrebuiltArtifact(
      archiveName: 'mylib-linux-x64.tar.gz',
      archiveSha256: '...',
      payloadSha256: '...',
      payload: DynamicLibraryPayload(libraryStem: 'mylib'),
    ),
  },
);

Constructors

PrebuiltManifest({required int schemaVersion, required ReleaseSource release, required Map<String, PrebuiltArtifact> artifacts})
const
PrebuiltManifest.fromJson(Map<String, dynamic> json)
factory

Properties

artifacts Map<String, PrebuiltArtifact>
Platform labels to artifact metadata.
final
hashCode int
The hash code for this object.
no setterinherited
release ReleaseSource
The release source from which artifacts are downloaded.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaVersion int
Schema version for forward compatibility.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supports(String platformLabel) bool
Whether the given platform label has a prebuilt artifact.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String platformLabel) PrebuiltArtifact?
Returns the artifact for platformLabel, or null if not available.