Capability class

A single detected capability of a node, optionally with a version and free-form details (e.g. the GPU model for cuda).

Annotations
  • @immutable

Constructors

Capability({required CapabilityKind kind, required String name, String? version, Map<String, String> details = const {}})
Creates a capability.
const
Capability.of(CapabilityKind kind, {String? version, Map<String, String> details = const {}})
Creates a capability for a well-known kind (name derived from the kind).
factory

Properties

details → Map<String, String>
Arbitrary extra detail (e.g. {'gpu': 'RTX 4090'}).
final
hashCode → int
The hash code for this object.
no setteroverride
kind → CapabilityKind
The capability kind.
final
name → String
The capability name (equals kind.name for well-known kinds, or a site-specific token for CapabilityKind.custom).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → String?
The detected version, if known (e.g. '24.0.7' for Docker).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
JSON form.
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) → Capability
Decodes from JSON.