Client class

Inheritance
Implementers

Constructors

Client(String host, {dynamic securityContext, @Deprecated('Use authKeyProvider instead. This will be removed in future releases.') AuthenticationKeyManager? authenticationKeyManager, Duration? streamingConnectionTimeout, Duration? connectionTimeout, dynamic onFailedCall(MethodCallContext, Object, StackTrace)?, dynamic onSucceededCall(MethodCallContext)?, bool? disconnectStreamsOnLostInternetConnection})

Properties

adminProcurement EndpointAdminProcurement
latefinal
adminProjects EndpointAdminProjects
latefinal
adminUsers EndpointAdminUsers
latefinal
auth EndpointAuth
latefinal
authenticationKeyManager AuthenticationKeyManager?
Optional AuthenticationKeyManager if the client needs to sign the user in.
no setterinherited
authKeyProvider ClientAuthKeyProvider?
Provides the authentication key for the client. Required to make authenticated requests. If not provided, all requests will be unauthenticated.
getter/setter pairinherited
authWithAuth EndpointAuthWithAuth
latefinal
billing EndpointBilling
latefinal
connectionTimeout Duration
Timeout when calling a server endpoint. If no response has been received, defaults to 20 seconds.
finalinherited
connectivityMonitor ConnectivityMonitor?
Set a connectivity monitor to better manage streaming connections. You can find the FlutterConnectivityMonitor in the serverpod_flutter package.
getter/setter pairinherited
customDomainName EndpointCustomDomainName
latefinal
database EndpointDatabase
latefinal
deploy EndpointDeploy
latefinal
endpointRefLookup Map<String, EndpointRef>
Looks up an EndpointRef by its name. This method is typically only used internally and overridden by generated code.
no setteroverride
environmentVariables EndpointEnvironmentVariables
latefinal
hackathon EndpointHackathon
latefinal
hashCode int
The hash code for this object.
no setterinherited
host String
Full url to the Serverpod server. E.g. "https://example.com/"
finalinherited
infraResources EndpointInfraResources
latefinal
logs EndpointLogs
latefinal
moduleLookup Map<String, ModuleEndpointCaller>
Looks up module callers by their name. Overridden by generated code.
no setteroverride
modules Modules
latefinal
onFailedCall → void Function(MethodCallContext callContext, Object error, StackTrace stackTrace)?
Callback when any call to the server fails or an exception is thrown.
finalinherited
onSucceededCall → void Function(MethodCallContext callContext)?
Callback when any call to the server succeeds.
finalinherited
plans EndpointPlans
latefinal
projects EndpointProjects
latefinal
roles EndpointRoles
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secrets EndpointSecrets
latefinal
serializationManager SerializationManager
The SerializationManager used to serialize objects sent to the server.
finalinherited
status EndpointStatus
latefinal
streamingConnectionStatus StreamingConnectionStatus
Returns the current status of the streaming connection. It can be one of connected, connecting, or disconnected. Use the StreamingConnectionHandler if you want to automatically reconnect if the connection is lost.
no setterinherited
streamingConnectionTimeout Duration
Timeout when opening a web socket connection. If no message has been received within the timeout duration the socket will be closed.
finalinherited
users EndpointUsers
latefinal

Methods

addStreamingConnectionStatusListener(VoidCallback listener) → void
Adds a callback for when the streamingConnectionStatus property is changed.
inherited
callServerEndpoint<T>(String endpoint, String method, Map<String, dynamic> args, {bool authenticated = true}) Future<T>
Calls a server endpoint method by its name, passing arguments in a map. Typically, this method is called by generated code.
inherited
callStreamingServerEndpoint<T, G>(String endpoint, String method, Map<String, dynamic> args, Map<String, Stream> streams, {bool authenticated = true}) → dynamic
Calls a server endpoint method that supports streaming. The streams parameter is a map of stream names to stream objects. The method will listen to the streams and send the data to the server. Typically, this method is called by generated code.
inherited
close() → void
Closes all open connections to the server.
inherited
closeStreamingConnection() Future<void>
Closes the streaming connection if it is open.
inherited
closeStreamingMethodConnections({Object? exception = const WebSocketClosedException()}) Future<void>
Closes all open streaming method connections.
inherited
getEndpointOfType<T extends EndpointRef>([String? name]) → T
Returns an endpoint of type T. If more than one endpoint of type T exists, name can be used to disambiguate.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openStreamingConnection({bool disconnectOnLostInternetConnection = true}) Future<void>
Open a streaming connection to the server.
inherited
removeStreamingConnectionStatusListener(VoidCallback listener) → void
Removes a connection status listener.
inherited
toString() String
A string representation of this object.
inherited
updateStreamingConnectionAuthenticationKey() Future<void>
Updates the authentication key if the streaming connection is open. Note, the provided key will be converted/wrapped as a proper authentication header value when sent to the server.
inherited

Operators

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