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
repository
fromFuture
toTaskEither
- 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 (
Either
type)
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:
getUserInformation
andupdateUserInformation
methods inside newUserDatabaseRepository
- Added
UserModel
class to store the user information (withfromJson
andtoJson
methods) - Added
widgets
folder containing new widgets displayed insideHomePage
Note: This PR also upgrades
supabase_flutter
to 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
SplashScreen
which 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) SignIn
andSignUp
pages 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
repository
pattern 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