- Clone this project
- Setup Database
Detailed instructions can be found here: Supabase Local Development
Prerequisites: Supabase Prerequisites
Steps:
- Run
supabase start
in package root directory to start a local supabase emulator. - Run
supabase db reset
to run migrations and fill local database with seed data. - Create supabase project.
- Link your CLI to your project.
- Run
supabase db push
to deploy local database migrations to remote database.
In your app you need to create a SupabaseConfig
-instance with your credentials to pass it to the package.
final supabaseConfig = SupabaseConfig(<supabaseUrl>, <supabaseKey>)
Values for local database:
After running supabase start
you get your credentials:
supabaseUrl = API URL
supabaseKey = anon key
Values for remote database:
Go to your project on Supabase and then go to API > Authentication
to find your credentials there.
- Start the test database
- Set your local Supabase credentials in
test/supabase_config.dart
- Run the tests with
flutter test