You can initialize Supabase with the static initialize()
method of the Supabase
class.
The Supabase client is your entrypoint to the rest of the Supabase functionality and is the easiest way to interact with everything we offer within the Supabase ecosystem.
The unique Supabase URL which is supplied when you create a new project in your project dashboard.
The unique Supabase Key which is supplied when you create a new project in your project dashboard.
Custom header to be passed to the Supabase client.
Custom http client to be used by the Supabase client.
Options to change the Auth behaviors.
Options to change the Postgrest behaviors.
Options to change the Realtime behaviors.
Options to change the Storage behaviors.
Future<void> main() async \{
await Supabase.initialize(
url: 'https://xyzcompany.supabase.co',
anonKey: 'public-anon-key',
);
runApp(MyApp());
\}
// Get a reference your Supabase client
final supabase = Supabase.instance.client;
final supabase = SupabaseClient(
'https://xyzcompany.supabase.co',
'public-anon-key',
);