sockets/socket_manager
library
Properties
-
socket
↔ Socket?
-
getter/setter pair
Functions
-
connectSocket(String apiUserName, String apiKey, String apiToken, String link)
→ Future<Socket>
-
Connects to the socket using the provided API credentials and link.
Returns a future that completes with the connected socket.
Throws an exception if any of the required inputs are empty or if the API key or token is invalid.
-
disconnectSocket(Socket? socket)
→ Future<bool>
-
Disconnects the socket if it is not null.
Returns
true if the socket was disconnected successfully, otherwise returns false.
-
validateApiKeyToken(String value)
→ Future<bool>
-
Validates the API key or token.
Returns
true if the value is a valid API key or token, otherwise throws an exception.