Supabase class

Supabase instance.

It must be initialized before used, otherwise an error is thrown.

await Supabase.initialize(...)

Use it:

final instance = Supabase.instance;

See also:

  • SupabaseAuth

Properties

client → SupabaseClient
The supabase client for this instance
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
Whether the Supabase instance has been initialized. Useful for debugging.
no setter
oauthLauncher → OAuthLauncher
The OAuthLauncher configured via FlutterAuthClientOptions.oauthLauncher, used by signInWithOAuth/signInWithSSO/linkIdentity to open the sign-in URL.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → Future<void>
Dispose the instance to free up resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance → Supabase
Gets the current supabase instance.
no setter

Static Methods

initialize({required String url, required String publishableKey, Map<String, String>? headers, Client? httpClient, RealtimeClientOptions realtimeOptions = const RealtimeClientOptions(), RealtimeLifecycleOptions realtimeLifecycleOptions = const RealtimeLifecycleOptions(), PostgrestClientOptions postgrestOptions = const PostgrestClientOptions(), StorageClientOptions storageOptions = const StorageClientOptions(), FlutterAuthClientOptions authOptions = const FlutterAuthClientOptions(), TracePropagationOptions? tracePropagationOptions, Future<String?> accessToken()?, AsyncJsonCodec? jsonCodec, Duration? requestTimeout, List<SupabaseClientInterceptor> interceptors = const []}) → Future<Supabase>
Initialize the current supabase instance