A collection of small apps that each show off a feature of supabase_flutter,
all sharing a single local Supabase instance.
| Example | What it shows |
|---|---|
authentication |
Email/password, magic link, OTP, phone, OAuth, anonymous and MFA auth |
database_crud |
Database CRUD with PostgREST (from(...)) |
edge_functions |
Invoking Edge Functions (functions.invoke(...)) |
passkeys |
Passkey (WebAuthn) sign in and management |
realtime_room |
Realtime Postgres Changes, Broadcast and Presence |
storage_transforms |
Storage uploads, downloads and image transforms |
From this directory, run the launcher. It boots the shared local Supabase stack and runs the example you pick, wiring the local credentials into it automatically.
./run.shYou will be asked which example to run, then it launches on Chrome at
http://localhost:3000. To run on a different device, forward arguments to
flutter run:
./run.sh -d macosForwarded arguments replace the default
-d chrome --web-port 3000. The passkeys example needs that fixed origin to matchsupabase/config.toml, so only override the device for examples that do not use passkeys.
If the launcher started the Supabase stack, it stops it again when you quit. If the stack was already running, it is left running.
- Flutter
- The Supabase CLI and a running Docker (or compatible) daemon
supabase/holds the shared Supabase setup.config.tomlis the one configuration every example runs against, so anything enabled there (for example email sign in) is available everywhere.launcher/is a small Dart CLI, wrapped byrun.sh, that runssupabase startagainst that config, reads back the localAPI_URLand publishable key, lists the examples, and runs the selected one with those values passed as--dart-defines.
Each example reads its configuration from --dart-define, so you can also run
one directly against any project:
cd examples/passkeys
flutter run -d chrome \
--dart-define=SUPABASE_URL=https://YOUR_PROJECT.supabase.co \
--dart-define=SUPABASE_PUBLISHABLE_KEY=YOUR_PUBLISHABLE_KEY- Create a new Flutter app directory under
examples/. - Read
SUPABASE_URLandSUPABASE_PUBLISHABLE_KEYwithString.fromEnvironment. - Enable any Supabase features it needs in
supabase/config.toml.
The launcher discovers any directory with a pubspec.yaml and a
lib/main.dart, so it will pick the new example up automatically.