Flutter: Initializing

You can initialize Supabase with the static initialize() method of 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.

Examples

For Flutter

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;

For other Dart projects

final supabase = SupabaseClient(
  'https://xyzcompany.supabase.co',
  'public-anon-key',
);