Skip to content

Commit 338f920

Browse files
author
dng
authored
Merge pull request supabase#11842 from supabase/docs/dart-initialization
Docs/dart initialization
2 parents 1432299 + 197f9bf commit 338f920

File tree

3 files changed

+36
-50
lines changed

3 files changed

+36
-50
lines changed

apps/docs/docs/ref/dart/initializing.mdx

Lines changed: 0 additions & 50 deletions
This file was deleted.

spec/common-client-libs-sections.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@
847847
},
848848
{
849849
"title": "Misc",
850+
"excludes": ["reference_dart_v1", "reference_dart_v0"],
850851

851852
"items": [
852853
{

spec/supabase_dart_v1.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,41 @@ info:
1616
version: '0.0.1'
1717

1818
functions:
19+
- id: initializing
20+
title: 'Initializing'
21+
$ref: '@supabase/supabase-js.index.SupabaseClient.constructor'
22+
description: |
23+
You can initialize Supabase with the static `initialize()` method of `Supabase` class.
24+
25+
The Supabase client is your entrypoint to the rest of the Supabase functionality
26+
and is the easiest way to interact with everything we offer within the Supabase ecosystem.
27+
28+
examples:
29+
- id: flutter-initialize
30+
name: For Flutter
31+
code: |
32+
```dart
33+
Future<void> main() async {
34+
await Supabase.initialize(
35+
url: 'https://xyzcompany.supabase.co',
36+
anonKey: 'public-anon-key',
37+
);
38+
39+
runApp(MyApp());
40+
}
41+
42+
// Get a reference your Supabase client
43+
final supabase = Supabase.instance.client;
44+
```
45+
- id: for-other-dart-projects
46+
name: For other Dart projects
47+
code: |
48+
```dart
49+
final supabase = SupabaseClient(
50+
'https://xyzcompany.supabase.co',
51+
'public-anon-key',
52+
);
53+
```
1954
- id: sign-up
2055
title: 'signUp()'
2156
description: |

0 commit comments

Comments
 (0)