SupabaseConfig class

Supabase configuration with runtime resolution.

Resolution order:

  1. User-saved credentials in FlutterSecureStorageInstanceMode.custom
  2. Compile-time values via --dart-defineInstanceMode.demo
  3. Neither available → InstanceMode.unconfigured

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

anonKey String
The active Supabase anon (public) key.
no setter
hasDemoCredentials bool
Whether compile-time demo credentials were provided via --dart-define.
no setter
isConfigured bool
Whether valid credentials are available.
no setter
isDemoInstance bool
Whether the currently active credentials are the demo ones (regardless of whether they came from storage or compile-time).
no setter
mgmtProxyBaseUrl String
Base URL for the mgmt-proxy Edge Function on the platform Supabase. Used as SupabaseProvisioner(baseUrl: ...) on web to work around the missing CORS headers on api.supabase.com.
no setter
mode InstanceMode
How the current credentials were resolved.
no setter
platformSupabaseUrl String
The Dutato "platform" Supabase URL — always the compile-time demo instance, regardless of whether the user has switched to their own project. Used to reach shared infrastructure that lives on the demo instance (e.g. the mgmt-proxy Edge Function used by the web build to call the Supabase Management API without hitting a CORS block).
no setter
url String
The active Supabase project URL.
no setter

Static Methods

clear([FlutterSecureStorage storage = const FlutterSecureStorage()]) Future<void>
Clear user-provided credentials (revert to demo or unconfigured).
extractProjectRef(String url) String?
Extracts the project ref from a Supabase URL.
load([FlutterSecureStorage storage = const FlutterSecureStorage()]) Future<void>
Load credentials. Call once at startup, before Supabase.initialize.
save(String url, String anonKey, [FlutterSecureStorage storage = const FlutterSecureStorage()]) Future<void>
Persist user-provided credentials to secure storage.