supabase_flutter library
Flutter integration for Supabase.
Classes
- AddPartitionSpecUpdate
- AddSchemaUpdate
- AddSortOrderUpdate
- AdminUserAttributes
- AMREntry
- An authentication method reference (AMR) entry.
- AnalyticsBucket
- A bucket backed by the Apache Iceberg table format, used for structured analytical data storage.
- ApiVersions
- AssertCreate
- AssertCurrentSchemaId
- AssertDefaultSortOrderId
- AssertDefaultSpecId
- AssertLastAssignedFieldId
- AssertLastAssignedPartitionId
- AssertReferenceSnapshotId
- AssertTableUuid
- AssignUuidUpdate
- AuthClientOptions
- AuthMFAAdminDeleteFactorResponse
- AuthMFAAdminListFactorsResponse
- AuthMFAChallengeResponse
- AuthMFAEnrollResponse
- AuthMFAGetAuthenticatorAssuranceLevelResponse
- AuthMFAListFactorsResponse
- AuthMFAUnenrollResponse
- AuthMFAVerifyResponse
- AuthResponse
- Response which might or might not contain session and/or user
- AuthSessionUrlResponse
- AuthState
- AuthUser
- Binding
- Bucket
- BucketOptions
- public The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private.
- ByteStream
- A stream of chunks of bytes representing a single piece of data.
- CommitTableResult
- The result of committing updates to a table.
- CreateCustomProviderParams
- Parameters for creating a new custom provider.
- CreateOAuthClientParams
- Parameters for creating a new OAuth client. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- CreateTableRequest
- Request describing a table to create.
- CustomOAuthProvider
- Custom OAuth/OIDC provider object returned from the admin API.
- DecodedJwt
- Decoded JWT structure
- DownloadBehavior
- Controls download behavior for signed and public URLs.
- EmptyLocalStorage
- A LocalStorage implementation that does nothing. Use this to disable persistence.
- Factor
- FileObject
- FileObjectV2
- FileOptions
- FileSort
- The column and direction that StorageFileApi.listPaginated sorts its results by.
- FlutterAuthClientOptions
- FunctionResponse
- FunctionsClient
- FunctionsClientOptions
- GenerateLinkProperties
- GenerateLinkResponse
- GetClaimsOptions
- Options for getClaims method
- GetClaimsResponse
- Response from getClaims method
- GoTrueAdminApi
- GoTrueAdminPasskeyApi
- Admin methods for managing the passkeys of users.
- GotrueAsyncStorage
- Interface to provide async storage to store pkce tokens.
- GoTrueClient
- API client to interact with gotrue server.
- GoTrueMFAApi
- GoTrueOAuthApi
- API namespace for the OAuth 2.1 authorization server consent flow.
- GoTruePasskeyApi
- API namespace for passkey (WebAuthn) authentication.
- IcebergRestCatalog
- Client for the Apache Iceberg REST Catalog exposed by Supabase Storage under an analytics bucket. It manages namespaces and tables within a warehouse (an analytics bucket).
- IcebergType
- A type in the Iceberg type system. Either a PrimitiveType represented by a type string, or one of the nested types StructType, ListType and MapType.
- JWK
- JSON Web Key (JWK) representation.
- JWKSet
- JwtHeader
- JWT Header structure
- JwtPayload
- JWT Payload structure with standard claims
- JwtRawParts
- Raw encoded parts of a JWT
- ListBucketsOptions
-
Filter, sort and pagination options for
StorageBucketApi.listBuckets. - ListNamespacesOptions
- Options for listing namespaces.
- ListNamespacesResult
- The result of listing namespaces.
- ListTablesOptions
- Options for listing tables.
- ListTablesResult
- The result of listing tables in a namespace.
- ListType
- A list type whose elements are of type element.
- LoadTableOptions
- Options for loading a table.
- LoadTableResult
- The full result of loading, creating or registering a table, including the server provided configuration, vended storage credentials and the response ETag.
- LocalStorage
- LocalStorage is used to persist the user session in the device.
- MapType
- A map type with keys of type key and values of type value.
- MultipartFile
-
A file to be uploaded as part of a
MultipartRequest. - OAuthAuthorizationDetailsResponse
- Response type representing the details of a pending OAuth authorization request that still requires the user's consent.
- OAuthAuthorizationRedirectResponse
- Response type returned when the signed-in user has already granted consent to the requesting client.
- OAuthAuthorizationResponse
- Result returned by GoTrueOAuthApi.getAuthorizationDetails.
- OAuthAuthorizedClient
- OAuth client object returned from the OAuth 2.1 server when the client is authorized.
- OAuthClient
- OAuth client object returned from the OAuth 2.1 server. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- OAuthConsentResponse
- Response type for an OAuth authorization consent decision (approve or deny).
- OAuthGrant
- An OAuth grant representing a user's authorization of an OAuth client.
- OAuthProvider
- An OAuth provider identifier.
- OAuthResponse
- Response of OAuth signin
- OIDCDiscoveryDocument
- OIDC discovery document fields.
- PaginatedFile
- A file entry returned by StorageFileApi.listPaginated.
- PaginatedFolder
- A folder entry returned by StorageFileApi.listPaginated when using a delimiter.
- PaginatedListResult
- The result of StorageFileApi.listPaginated.
- PaginatedSearchOptions
- Options for StorageFileApi.listPaginated.
- PartitionField
- A single field of a PartitionSpec.
- PartitionSpec
- Describes how a table is partitioned.
- Passkey
- A passkey (WebAuthn credential) registered to a user.
- PasskeyAuthenticationOptionsResponse
- Response containing the options needed to sign in with a passkey.
- PasskeyRegistrationOptionsResponse
- Response containing the options needed to register a new passkey.
- PhoneEnrollment
- PostgresChangeFilter
- Creates a filter for realtime postgres change listener.
- PostgresChangePayload
- Data class that contains the Postgres change event payload.
- PostgresColumn
-
PostgrestBuilder<
T, S, R> - The base builder class.
- PostgrestClient
- A PostgREST api client written in Dartlang. The goal of this library is to make an "ORM-like" restful interface.
- PostgrestClientOptions
-
PostgrestFilterBuilder<
T> -
PostgrestQueryBuilder<
T> - The query builder class provides a convenient interface to creating request queries.
-
PostgrestResponse<
T> - A Postgrest response
- PostgrestRpcBuilder
-
PostgrestTransformBuilder<
T> - Presence
- A single shared state between users with Realtime Presence.
- PresenceEvents
- PresenceOpts
- PrimitiveType
-
A primitive Iceberg type such as
int,string,decimal(10,2)orfixed[16]. -
RawPostgrestBuilder<
T, S, R> - Needed as a wrapper around PostgrestBuilder to allow for the different return type of withConverter than in ResponsePostgrestBuilder.withConverter.
- RawTableUpdate
- RealtimeChannel
- RealtimeChannelConfig
- RealtimeClient
- Manages a persistent WebSocket connection to the Supabase Realtime server.
- RealtimeClientOptions
- Options to pass to the RealtimeClient.
- RealtimeCloseEvent
- Event details for when the connection closed.
- RealtimePresence
- RealtimePresenceJoinPayload
- Payload for PresenceEvent.join callback.
- RealtimePresenceLeavePayload
- Payload for PresenceEvent.leave callback.
- RealtimePresencePayload
-
Base class for the payload in
.onPresence()callback functions. - RealtimePresenceSyncPayload
- Payload for PresenceEvent.sync callback.
- RealtimeSystemPayload
-
Payload of a
systemevent emitted by the server. - RegisterTableRequest
- Request to register an existing metadata file as a table.
- RemovePartitionSpecsUpdate
- RemovePropertiesUpdate
- RemoveSchemasUpdate
- RemoveSnapshotReferenceUpdate
- RemoveSnapshotsUpdate
- RemoveSubscriptionResult
- ReplayOption
- Configuration for broadcast replay feature. Allows replaying broadcast messages from a specific timestamp.
- ResendResponse
-
ResponsePostgrestBuilder<
T, S, R> - Needed as a wrapper around PostgrestBuilder to allow for the different return type of withConverter than in RawPostgrestBuilder.withConverter.
- SearchOptions
- Session
- SetCurrentSchemaUpdate
- SetDefaultSortOrderUpdate
- SetDefaultSpecUpdate
- SetLocationUpdate
- SetPropertiesUpdate
- SetSnapshotReferenceUpdate
- local storage to store pkce flow code verifier.
- A LocalStorage implementation that implements SharedPreferences as the storage method.
- SignedUploadURLResponse
- SignedUrl
- SignedUrlFailure
- A failed SignedUrlResult: the path could not be signed (e.g. the file does not exist).
- SignedUrlResult
- Represents a per-item result from StorageFileApi.createSignedUrlsResult.
- SignedUrlSuccess
- A successful SignedUrlResult: the file was found and a signed URL was generated.
- SinglePresenceState
- A single client connected through presence.
- Snapshot
- A snapshot of a table at a point in time.
- SnapshotReference
- A reference (branch or tag) pointing at a snapshot.
- SortBy
- SortField
- A single field of a SortOrder.
- SortOrder
- Describes how a table is sorted when written.
- StorageClientOptions
- StorageCredential
- Temporary storage credentials vended by the server for a table path prefix.
- StorageFileApi
- StorageRetryController
- StorageVectorBucketApi
- Index operations scoped to a single vector bucket.
- StorageVectorIndexApi
- Vector data operations scoped to a single index within a bucket.
- StructType
- A nested struct type containing fields.
- Supabase
- Supabase instance.
- SupabaseClient
- Creates a Supabase client to interact with your Supabase instance.
- SupabaseQueryBuilder
- SupabaseQuerySchema
- Used to perform rpc and from operations with a different schema than in SupabaseClient.
- SupabaseStorageClient
- SupabaseStreamBuilder
- SupabaseStreamFilterBuilder
- SupabaseVectorsClient
-
Client for the Storage Vectors API, reachable through
supabase.storage.vectors. - TableField
- A field within a StructType or a TableSchema.
- TableIdentifier
- Identifies a table by its namespace and name.
- TableMetadata
- Metadata describing the current state of a table, returned when loading or committing to a table.
- TableRequirement
- A precondition that must hold for a table commit to be applied. The server rejects the commit if any requirement is not met.
- TableSchema
- The schema of a table, a struct of fields.
- TableUpdate
- A single change applied to a table as part of a commit. The common data definition updates are modelled as dedicated subclasses. Updates that are not modelled (for example snapshot, statistics and encryption key updates) can be sent with TableUpdate.raw.
- TOTPEnrollment
- TraceContext
- W3C trace context headers.
- TracePropagationOptions
- Options controlling W3C trace context propagation onto outgoing Supabase requests.
- TransformOptions
- Specifies the dimensions and the resize mode of the requesting image.
- UpdateCustomProviderParams
- Parameters for updating an existing custom provider.
- UpdateNamespacePropertiesResult
- The result of a namespace properties update.
- UpdateOAuthClientParams
- Parameters for updating an existing OAuth client. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- UpgradeFormatVersionUpdate
- User
- UserAttributes
- UserIdentity
- UserResponse
- Response that contains a user
- Vector
- A single vector to insert or update through StorageVectorIndexApi.putVectors.
- VectorBucket
- Metadata describing a vector bucket.
- VectorBucketEncryption
- Encryption settings attached to a vector bucket.
- VectorBucketList
- The result of SupabaseVectorsClient.listBuckets.
- VectorIndex
- Metadata describing a vector index within a bucket.
- VectorIndexList
- The result of StorageVectorBucketApi.listIndexes.
- VectorList
- The result of StorageVectorIndexApi.listVectors.
- VectorMatch
- A vector returned from a get, list or query operation.
- VectorQueryResult
- The result of StorageVectorIndexApi.queryVectors.
Enums
- AccessDelegation
- Access delegation mechanisms that can be requested from the server for table read and write operations.
- AMRMethod
- AuthChangeEvent
- AuthenticatorAssuranceLevels
- AuthFlowType
- BucketSortColumn
-
The column that
StorageBucketApi.listBucketscan sort its results by. - BucketSortOrder
-
The direction that
StorageBucketApi.listBucketssorts its results in. - ChannelResponse
- CountOption
- Returns count as part of the response when specified.
- CustomProviderType
- Type of a custom OAuth/OIDC provider managed through the admin API.
- DistanceMetric
- Distance metric used when comparing vectors during a similarity search.
- ErrorCode
- ExplainFormat
-
The format of the plan returned by
PostgrestTransformBuilder.explain. - FactorStatus
- FactorType
- FileSortColumn
- The column that StorageFileApi.listPaginated can sort its results by.
- FileSortOrder
- The direction that StorageFileApi.listPaginated sorts its results in.
- GenerateLinkType
- HttpMethod
- LaunchMode
- The desired mode to launch a URL.
- LoadTableSnapshots
- Which snapshots the server should include when loading a table.
- NullOrder
- Where null values are ordered relative to non null values in a SortField.
- OAuthClientGrantType
- OAuth client grant types supported by the OAuth 2.1 server. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- OAuthClientRegistrationType
- OAuth client registration type. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- OAuthClientResponseType
- OAuth client response types supported by the OAuth 2.1 server. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- OAuthClientType
- OAuth client type indicating whether the client can keep credentials confidential. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
- OtpChannel
- Messaging channel to use (e.g. whatsapp or sms)
- OtpType
- PostgresChangeEvent
- PostgresChangeFilterType
- Specifies the type of filter to be applied on realtime Postgres Change listener.
- PostgresTypes
- PresenceEvent
- RealtimeHeartbeatStatus
- The lifecycle status of a heartbeat reported to RealtimeClient.onHeartbeat.
- RealtimeLogLevel
- RealtimeProtocolVersion
- RealtimeSubscribeStatus
- RequestImageFormat
- ResizeMode
- Specifies how image cropping should be handled when performing image transformations.
- ReturningOption
- Returns count as part of the response when specified.
- SignOutReason
- The reason why an AuthChangeEvent.signedOut event was emitted.
- SignOutScope
- Determines which sessions should be logged out.
- SnapshotReferenceType
- The kind of reference a SnapshotReference points to.
- SocketStates
- SortDirection
- The direction used when sorting a SortField.
- SupabaseEventTypes
- TextSearchType
-
The type of tsquery conversion to use on
query. - VectorDataType
- Supported data types for vector components.
- Web3Chain
- The blockchain used to sign in with a Web3 wallet.
Extensions
- GoTrueClientPasskey on GoTrueClient
- Passkey (WebAuthn) convenience methods that perform the full ceremony, including the platform prompt (FaceID/TouchID/security key), on top of the server side exposed by GoTrueClient.passkey.
- GoTrueClientSignInProvider on GoTrueClient
- PresenceEventExtended on PresenceEvent
- SupabaseEventTypesName on SupabaseEventTypes
Constants
- supabasePersistSessionKey → const String
- Only used for migration from Hive to SharedPreferences. Not actually in use.
Functions
-
convertCell(
String type, dynamic value) → dynamic -
If the value of the cell is
null, returns null. Otherwise converts the string value to the correct type. -
convertChangeData(
List< Map< columns, Map<String, dynamic> >String, dynamic> record, {List<String> ? skipTypes}) → Map<String, dynamic> - Takes an array of columns and an object of string values then converts each string value to its mapped type.
-
convertColumn(
String columnName, List< PostgresColumn> columns, Map<String, dynamic> record, List<String> skipTypes) → dynamic - Converts the value of an individual column.
-
decodeJwt(
String token) → DecodedJwt - Decodes a JWT token without performing validation
-
httpEndpointURL(
String socketUrl) → String - Converts a WebSocket URL to an HTTP URL.
-
noop(
dynamic value) → dynamic -
toArray(
dynamic value, String type) → dynamic - Converts a Postgres Array into a native Dart array
-
toBoolean(
dynamic value) → bool? -
toDouble(
dynamic value) → double? -
toInt(
dynamic value) → int? -
toJson(
dynamic value) → dynamic -
toTimestampString(
String? value) → String? - Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T' See https://github.com/supabase/supabase/issues/18
-
validateExp(
int? exp) → void - Validates the expiration time of a JWT
Typedefs
- BindingCallback = void Function(dynamic payload, [dynamic ref])
-
BroadcastChannel
= ({void Function() close, Stream<
Map< onMessage, void Function(Map) postMessage})String, dynamic> > -
Headers
= Map<
String, String> -
PostgrestConverter<
S, T> = S Function(T data) -
PostgrestList
= List<
PostgrestMap> -
PostgrestListResponse
= PostgrestResponse<
PostgrestList> -
PostgrestMap
= Map<
String, dynamic> -
PostgrestMapResponse
= PostgrestResponse<
PostgrestMap> -
PresenceChooser<
T> = T Function(String key, dynamic presence) - PresenceOnJoinCallback = void Function(String? key, dynamic currentPresences, dynamic newPresences)
- PresenceOnLeaveCallback = void Function(String? key, dynamic currentPresences, dynamic newPresences)
- RealtimeConstants = Constants
-
RealtimeDecode
= Map<
String, dynamic> Function(Object payload) -
Deserializes a raw incoming WebSocket frame (
Stringor binary) into a message map. -
RealtimeEncode
= Object Function(Map<
String, dynamic> payload) -
Serializes an outgoing message into the
Stringor binary frame written to the WebSocket. -
SupabaseStreamEvent
= List<
Map< String, dynamic> > -
TraceContextProvider
= FutureOr<
TraceContext?> Function() - Supplies the current W3C trace context for outgoing Supabase requests.
-
WebSocketTransport
= WebSocketChannel Function(String url, Map<
String, String> headers)
Exceptions / Errors
- AuthApiException
- AuthException
- AuthInvalidJwtException
- AuthPKCEGrantCodeExchangeError
- AuthRetryableFetchException
- AuthSessionMissingException
- AuthUnknownException
- AuthWeakPasswordException
- FunctionException
- FunctionsFetchException
- Thrown when the request to the Edge Function could not be sent, for example because of a network or transport failure, before any response was received.
- FunctionsHttpException
- Thrown when the Edge Function itself responds with a non-2xx status code.
- FunctionsRelayException
-
Thrown when the Supabase relay returns an error while invoking the Edge
Function, indicated by the
x-relay-errorresponse header. - IcebergAuthenticationTimeoutException
- Authentication timed out and the request should be retried with fresh credentials (HTTP 419).
- IcebergCommitStateUnknownException
- A table commit was sent but its outcome is unknown, so retrying it could duplicate data.
- IcebergConflictException
- The request conflicts with the current state, for example the resource already exists or a commit lost a race (HTTP 409).
- IcebergException
- Error thrown by IcebergRestCatalog operations when the Iceberg REST Catalog API returns an error response or a request fails at the network level.
- IcebergNetworkException
- A request failed at the network level, before any response was received.
- IcebergNotFoundException
- The requested namespace or table does not exist (HTTP 404).
- IcebergServerException
- The server failed to handle the request (HTTP 5xx).
- IcebergUnknownException
- Any Iceberg failure that does not fit a more specific subtype.
- PostgrestException
- A Postgrest response exception
- RealtimeSubscribeException
- RequestAbortedException
- Thrown when an HTTP request is aborted.
- StorageException
- SupabaseRealtimeError