toCompanion method

NodesCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

NodesCompanion toCompanion(bool nullToAbsent) {
  return NodesCompanion(
    nodeId: Value(nodeId),
    role: Value(role),
    groupId: groupId == null && nullToAbsent
        ? const Value.absent()
        : Value(groupId),
    lastSeen: Value(lastSeen),
    hopCount: Value(hopCount),
    displayName: displayName == null && nullToAbsent
        ? const Value.absent()
        : Value(displayName),
    batteryLevel: batteryLevel == null && nullToAbsent
        ? const Value.absent()
        : Value(batteryLevel),
    hasInternetAccess: Value(hasInternetAccess),
    metadata: metadata == null && nullToAbsent
        ? const Value.absent()
        : Value(metadata),
  );
}