AsklessClient<USER_ID> class

Properties

connection ConnectionDetails
Current connection status to the server with details
no setter
disconnectReason DisconnectionReason?
Disconnection reason only in case where connection equals Connection.disconnectedAt
no setter
hashCode int
The hash code for this object.
no setterinherited
reconnectWhenDidNotReceivePongFromServerTask ReconnectWhenDidNotReceivePongFromServerTask
final
reconnectWhenOffline ReconnectWhenOffline
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendMessageToServerAgainTask SendMessageToServerAgainTask
final
sendPingTask SendPingTask
final
serverUrl String?
The server URL that Askless should be connected to
no setter

Methods

addOnConnectionChangeListener(OnConnectionChange listener, {bool immediately = false}) → void
Adds a listener that will be triggered every time the status of the connection to the server changes.
addOnReceiveCallListener(OnReceiveVideoCallListener listener) ReceivingCallsInstance
Adds a listener that handles call requests coming from any remote user. Returns a ReceivingCallsInstance object where you can call ReceivingCallsInstance.cancel to stop receiving new call requests
authenticate({required Map<String, dynamic> credential, bool neverTimeout = false}) Future<AuthenticateResponse>
Performs an authentication attempt to the server side. Useful for the login page or to authenticate with tokens automatically in the startup of your App.
clearAuthentication() Future<void>
Clears the authentication, you may want to call this in case the user clicks in a logout button for example.
create({required String route, required dynamic body, Map<String, dynamic>? params, bool neverTimeout = false, bool persevere = false}) Future<AsklessResponse>
Performs a request attempt for a create route added on the server side
delete({required String route, Map<String, dynamic>? params, bool neverTimeout = false, bool persevere = false}) Future<AsklessResponse>
Performs a request attempt for a delete route added on the server side
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read({required String route, Map<String, dynamic>? params, bool neverTimeout = false, bool persevere = false}) Future<AsklessResponse>
Performs a request attempt for a read route added on the server side
readStream({required String route, Map<String, dynamic>? params, StreamSource source = StreamSource.remoteOnly, bool persevere = true}) Stream
Read and stream data for a read route added on the server side
removeOnConnectionChangeListener(OnConnectionChange listenerToRemove) → void
Removes the listener which is triggered every time the status of the connection to the server changes.
requestCallToUser({required MediaStream localStream, required USER_ID userId, Map<String, dynamic>? additionalData}) RequestCallToUserInstance
Request a call to a remote user. Returns a RequestCallToUserInstance
start({required String serverUrl, bool debugLogs = false, OnAutoReauthenticationFails? onAutoReauthenticationFails, Future<WebRTCParams> getWebRTCParams(USER_ID userId)?}) → void
Init and start Askless. This method should be called before making any operations using Askless.
streamConnectionChanges({bool immediately = true}) Stream<ConnectionDetails>
Stream changes of the connection status to the server.
toString() String
A string representation of this object.
inherited
update({required String route, required dynamic body, Map<String, dynamic>? params, bool neverTimeout = false, bool persevere = false}) Future<AsklessResponse>
Performs a request attempt for a update route added on the server side

Operators

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

Static Properties

instance AsklessClient
final