Device class

Class that represent every connected device with NearbyCross plugin

Constructors

Device(String endpointId, Uint8List endpointName)
Device.asEndpoint(String endpointId, Uint8List endpointName)
Device.asPendingConnection(String endpointId, Uint8List endpointName)

Properties

authManager AuthenticationManager?
getter/setter pair
callbackReceivedMessage HashMap<String, dynamic Function(Device)>
getter/setter pair
endpointId String
getter/setter pair
endpointName Uint8List
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
hasNewMessages bool
getter/setter pair
identifier String
getter/setter pair
isAuthenticated bool
getter/setter pair
isEndpointOnly bool
getter/setter pair
isPendingConnection bool
getter/setter pair
logger ↔ Logger
getter/setter pair
messages List<NearbyMessage>
getter/setter pair
messagesSent List<NearbyMessage>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
verifier SigningManager?
getter/setter pair

Methods

addMessage(NearbyMessage message) → void
Adds message to received messages list
addVerifier(SigningManager verifier) → void
clearMessages() → void
getAllMessages() List<NearbyMessage>
Retrieves message and messageSent list
getLastMessage() NearbyMessage?
Retrieves last message received
getMessagesReceived() List<NearbyMessage>
Retrieves messages received list
getMessagesSent() List<NearbyMessage>
Retrieves messages sent list
lastMassageIsAuthenticated() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(NearbyMessage message, {bool dropMessage = false}) → void
Sends message to the device identified with endpointId
setAuthManager(AuthenticationManager authManager) → void
setCallbackReceivedMessage(String callbackName, dynamic callbackReceivedMessage(Device)) → void
Sets callbackReceivedMessage callback that executes every time a message is received.
setIdentifier(String newId) → void
setIsAuthenticated(bool isAuth) → void
toItem() Item
toString() String
A string representation of this object.
override
unsetCallbackReceivedMessage(String callbackKey) → void
Unset callbackReceivedMessage
validateMessageOwner(NearbyMessage message) bool

Operators

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