The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Adds more initialization examples in Flutter docs
dshukertjrd0641adda48f
diff --git a/apps/docs/docs/reference/dart/initializing.mdx b/apps/docs/docs/reference/dart/initializing.mdxindex 00a69bbf1f3..5d18b73c980 100644--- a/apps/docs/docs/reference/dart/initializing.mdx+++ b/apps/docs/docs/reference/dart/initializing.mdx@@ -28,6 +28,33 @@ Once you initialize Supabase in your `main()` method, you can access the `Supabafinal supabase = Supabase.instance.client;```+### Call `initialize()` with custom headers++You can pass `headers` to initialize your Supabase client with customer headers.+Here is an example of passing a custom auth header to Supabase client.+```dart title=main.dart+Future<void> main() async {+ await Supabase.initialize(+ url: 'https://xyzcompany.supabase.co',+ anonKey: 'public-anon-key',+ headers: {+ 'Authorization': 'Bearer $accessToken',+ },+ );+ runApp(const MyApp());+}+```++### Call `initialize()`multiple times++You can initialize Supabase multiple times in your app. When doing so, remember to call `dispose()` before every time you initialize again.++```dart+Supabase.instance.dispose();++await Supabase.initialize(url: 'https://xyzcompany.supabase.co', anonKey: 'public-anon-key');+```+## Other Dart ProjectsYou can initialize a new Supabase client using the `SupabaseClient()` method.