mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
51 lines
1019 B
Plaintext
51 lines
1019 B
Plaintext
---
|
|
id: initializing
|
|
title: 'Initializing'
|
|
slug: initializing
|
|
---
|
|
|
|
<RefSubLayout.EducationRow>
|
|
<RefSubLayout.Details>
|
|
|
|
Initialize Supabase with the static `initialize()` method on `Supabase` class.
|
|
|
|
</RefSubLayout.Details>
|
|
|
|
<RefSubLayout.Examples>
|
|
|
|
<Tabs
|
|
size="small"
|
|
type="underlined"
|
|
defaultActiveId="flutter"
|
|
>
|
|
<TabPanel id="flutter" label="Flutter">
|
|
|
|
```dart main.dart
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await Supabase.initialize(
|
|
url: 'https://xyzcompany.supabase.co',
|
|
anonKey: 'public-anon-key',
|
|
);
|
|
|
|
runApp(MyApp());
|
|
}
|
|
```
|
|
|
|
</TabPanel>
|
|
<TabPanel id="dart" label="Other Dart Project">
|
|
|
|
```dart
|
|
final supabase = SupabaseClient(
|
|
'https://xyzcompany.supabase.co',
|
|
'public-anon-key',
|
|
);
|
|
```
|
|
|
|
</TabPanel>
|
|
</Tabs>
|
|
|
|
</RefSubLayout.Examples>
|
|
</RefSubLayout.EducationRow>
|