Releases: SandroMaglione/flutter-supabase-template
Package upgrades
Upgraded dependencies and their configuration to latest version:
auto_route(Navigation)injectable(Dependency injection)fpdart(Functional programming)
What's Changed
- Package upgrades by @SandroMaglione in #9
Functional programming (`fpdart`)
This PR refactors the code to add Functional programming with the fpdart package.
Functional programming makes error handling in the app more solid and safe. These are the main changes:
- Updated return type in
repositoryfromFuturetoTaskEither - Added error types for each request
- Refactored repository implementations to return
TaskEither(usingfpdart's methods liketryCatch,flatMap,map) - Execute requests and display error message based on the type of error returned (
Eithertype)
What's Changed
- Functional programming (
fpdart) [6] by @SandroMaglione in #7
Supabase database
This PR introduces a complete setup for using Supabase database.
This update is built on top of the previous PR on Supabase authentication. Once the user signs in, we display a form to update first name and last name in the database:
getUserInformationandupdateUserInformationmethods inside newUserDatabaseRepository- Added
UserModelclass to store the user information (withfromJsonandtoJsonmethods) - Added
widgetsfolder containing new widgets displayed insideHomePage
Note: This PR also upgrades
supabase_flutterto v1.1.0, with a few breaking changes
What's Changed
- Supabase database [5] by @SandroMaglione in #6
Supabase authentication
This PR introduces a complete setup for using Supabase auth.
This configuration works as follows:
- Initial
SplashScreenwhich shows a loading indicator. This is used to wait for the app to load the current authentication session and then redirect to either the sign in page (no auth) or the home page (with auth) SignInandSignUppages to register the user and log in in the app- Sign out button in the home page used to sign out the user
- Listener for authentication events which manages the navigation stack as new events are detected
- Configuration of
repositorypattern to manage auth implementations
What's Changed
- Supabase authentication [4] by @SandroMaglione in #4
Dependency injection (`injectable`)
Added configuration for dependency injection using injectable.
The configuration also contains an example repository to test the correct build generation.
What's Changed
- Dependency injection (
injectable) [3] by @SandroMaglione in #3
Routing (`auto_route`)
Added auto_route setup for app navigation.
Note: This is the basic configuration. As the app evolves, more features will be added.
What's Changed
- Routing (
auto_route) [2] by @SandroMaglione in #2
Environment variables
Setup for environment variables using String.fromEnvironment. Adding also a launch.json file to vscode to run the app using --dart-define.
What's Changed
- Environment variables [1] by @SandroMaglione in #1


