Setup Supabase
Setup backend
- Setup Flutter and Supabase
- Go to Project Settings > API. Then copy the project url and anon key into the variables
SUPABASE_URL
andSUPABASE_ANON_KEY
respectively in theenv.json
file.
{
"SUPABASE_URL": "https://crnytzptlghehxsarjxm.supabase.co",
"SUPABASE_ANON_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNybnl0enB0bGdoZWh4c2FyanhtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDkyMjQxNjgsImV4cCI6MjAyNDgwMDE2OH0.UW1dHRt4hGF6uCdPXimxv0Ggwq5uJ1WoQuCZ1_ixmCU"
}
- Test your flutter app that is now connected to your own backend
flutter run --dart-define-from-file=env.json
Local setup (Optional)
- Setup local Supabase
- Run the flutter web app (in new terminal)
cd flutter
flutter run --dart-define-from-file=env.local.json -d chrome