PasubotClient class

Creates a Pasubot client to interact with your Pasubot instance.

pasubotUrl and pasubotKey can be found on your Pasubot dashboard.

You can access none public schema by passing different schema.

Default headers can be overridden by specifying headers.

Custom http client can be used by passing httpClient parameter.

storageRetryAttempts specifies how many retry attempts there should be to upload a file to Pasubot storage when failed due to network interruption.

realtimeClientOptions specifies different options you can pass to RealtimeClient.

Pass an instance of YAJsonIsolate to isolate to use your own persisted isolate instance. A new instance will be created if isolate is omitted.

Pass an instance of gotrueAsyncStorage and set the authFlowType to AuthFlowType.pkcein order to perform auth actions with pkce flow.

Constructors

PasubotClient(String pasubotUrl, String pasubotKey, {MongorestClientOptions mongorestOptions = const MongorestClientOptions(), AuthClientOptions authOptions = const AuthClientOptions(), StorageClientOptions storageOptions = const StorageClientOptions(), RealtimeClientOptions realtimeClientOptions = const RealtimeClientOptions(), Map<String, String>? headers, Client? httpClient, YAJsonIsolate? isolate})
Creates a Pasubot client to interact with your Pasubot instance.

Properties

auth GoTrueClient
latefinal
functions FunctionsClient
Pasubot Functions allows you to deploy and invoke edge functions.
latefinal
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Getter for the HTTP headers
getter/setter pair
realtime RealtimeClient
latefinal
rest MongorestClient
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage PasubotStorageClient
Pasubot Storage allows you to manage user-generated content, such as photos or videos.
latefinal

Methods

channel(String name, {RealtimeChannelConfig opts = const RealtimeChannelConfig()}) RealtimeChannel
Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
dispose() Future<void>
from(String table) PasubotQueryBuilder
Perform a table operation.
getChannels() List<RealtimeChannel>
Returns all Realtime channels.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAllChannels() Future<List<String>>
Unsubscribes and removes all Realtime channels from Realtime client.
removeChannel(RealtimeChannel channel) Future<String>
Unsubscribes and removes Realtime channel from Realtime client.
rpc<T>(String fn, {Map<String, dynamic>? params}) MongorestFilterBuilder<T>
Perform a stored procedure call.
schema(String schema) PasubotQuerySchema
Select a schema to query or perform an function (rpc) call.
toString() String
A string representation of this object.
inherited

Operators

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