Complete configuration of a Flutter app with Supabase: environments, authentication, database, and more.
Flutter + Supabase
app templateThis app is a complete setup for a production ready Flutter application using Supabase for authentication, database, storage, and more.
Make sure you installed Flutter and Dart in your machine
git clone https://github.com/SandroMaglione/flutter-supabase-template.git
flutter pub get
build_runner
)flutter packages pub run build_runner build
.vscode/launch.json
args
with your Supabase project URL (SUPABASE_URL
) and Key (SUPABASE_ANNON_KEY
):{
"version": "0.2.0",
"configurations": [
{
"name": "Production",
"request": "launch",
"type": "dart",
"program": "lib/main_prod.dart",
"args": [
"--dart-define=SUPABASE_URL=Url",
"--dart-define=SUPABASE_ANNON_KEY=Key"
]
}
]
}
The project is organized in releases, each containing a specific set of changes for one feature:
auto_route
)
injectable
)
fpdart
)
You can review each set of changes individually by looking at each release.
Note: Each feature is build on top of the previous one.
Note: This setup is opinionated. There are many other possible solutions and packages to achieve the same (or better) result. It would be interesting to start a discussion about each solution (by opening new PRs implementing other options)
Each feature in the app has a blog post associated with it that explains more in the details the changes made:
auto_route
)
injectable
)
fpdart
)
Every feedback, feature request, and contribution is gladly accepted: