TaskCapabilities class final

Declared package support for one task on a platform: which Delegates run there and why the others do not. This is not an inference self-test.

Model validity, native-asset opt-in, and available memory are checked when creating a task. Querying support does not download assets or initialize the GPU.

Constructors

TaskCapabilities.cpuOnTargets({required TaskPlatform platform, required String gpuUnavailableReason, required String runtimeVersion, RuntimeTargets targets = tasksRuntimeTargets})
Describe CPU support on every target in targets, with the GPU explained as unavailable by gpuUnavailableReason on targets that are supported.
factory
TaskCapabilities.onTargets({required TaskPlatform platform, required Map<Delegate, RuntimeTargets> delegates, required Map<Delegate, String> unavailableReasons, required String runtimeVersion})
Describe delegates whose validated target sets differ.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isSupported → bool
Whether at least one delegate is supported on this platform.
no setter
minimumOperatingSystemVersion → String?
Minimum product version of the operating system the packaged native runtime requires, if any: the current platform's when it is supported, otherwise the first supported target's.
no setter
platform → TaskPlatform
Current process platform used to evaluate support.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
runtimeVersion → String
Pinned upstream runtime version behind these tasks.
final
supportedDelegates → Set<Delegate>
Delegates supported by this package on the current process platform.
final
supportedTargets → RuntimeTargets
Process targets with a validated runtime, and their minimum OS versions.
no setter
unavailableReasons → Map<Delegate, String>
A human-readable explanation for each unavailable delegate.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited