PlatformInfo class

Describes the operating system and architecture a node runs on, advertised to clients during discovery and shown by the :info local command.

Annotations
  • @immutable

Constructors

PlatformInfo({required String os, required String arch, required String agentVersion, required String hostname})
Creates platform info.
const
PlatformInfo.local({required String agentVersion})
Captures the platform of the current process.
factory

Properties

agentVersion String
The node agent version string — the OmnyShell build the node reports it is running (see omnyShellVersion); the Hub reports the sentinel 'hub'.
final
arch String
The processor architecture (e.g. x64, arm64).
final
hashCode int
The hash code for this object.
no setterinherited
hostname String
The node's hostname.
final
os String
The operating system name (e.g. linux, macos, windows).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) PlatformInfo
Decodes from a JSON map.