Node class
Constructors
Node ({required String nodeId , required int role , String ? groupId , required int lastSeen , required int hopCount , String ? displayName , int ? batteryLevel , required bool hasInternetAccess , String ? metadata })
const
Node.fromJson (Map <String , dynamic > json , {ValueSerializer? serializer })
factory
Properties
batteryLevel
→ int ?
Battery level of the node (0-100).
final
displayName
→ String ?
Human-readable display name chosen by the user.
final
groupId
→ String ?
Optional group affiliation. Null means the node is ungrouped.
Used by NodeRole.group nodes for filtered routing.
final
hashCode
→ int
The hash code for this object.
no setter override
hasInternetAccess
→ bool
Whether the node has internet access.
final
hopCount
→ int
How many relay hops away this node was last known to be.
0 = direct encounter, 1 = one hop away, etc.
final
lastSeen
→ int
Epoch milliseconds of the last time this node was encountered
(directly or via gossip).
final
metadata
→ String ?
Extensible JSON blob for future metadata (e.g., capabilities, version).
final
nodeId
→ String
Unique node identifier (UUID v4, generated on first launch).
final
role
→ int
The node's mesh role, stored as an integer mapping to NodeRole .
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
copyWith ({String ? nodeId , int ? role , Value<String ? > groupId = const Value.absent() , int ? lastSeen , int ? hopCount , Value<String ? > displayName = const Value.absent() , Value<int ? > batteryLevel = const Value.absent() , bool ? hasInternetAccess , Value<String ? > metadata = const Value.absent() })
→ Node
copyWithCompanion (NodesCompanion data )
→ Node
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColumns (bool nullToAbsent )
→ Map <String , Expression<Object > >
Converts this object into a map of column names to expressions to insert
or update.
toCompanion (bool nullToAbsent )
→ NodesCompanion
toJson ({ValueSerializer? serializer })
→ Map <String , dynamic >
Converts this object into a representation that can be encoded with
json. The serializer can be used to configure how individual values
will be encoded. By default, DriftRuntimeOptions.defaultSerializer will
be used. See ValueSerializer.defaults for details.
toJsonString ({ValueSerializer? serializer })
→ String
Converts this object into a json representation. The serializer can be
used to configure how individual values will be encoded. By default,
DriftRuntimeOptions.defaultSerializer will be used. See
ValueSerializer.defaults for details.
inherited
toString ()
→ String
A string representation of this object.
override