fpdart_riverpod
Learn how to use fpdart
and riverpod
to implement a safe, maintainable, and testable flutter app.
This repository contains the source code for the course Fpdart & Riverpod - Safe, maintainable, testable Flutter apps.
Note: You can subscribe to the newsletter to receive live updates, exclusive previews, sneak peaks, and more about this course
This project is your usual flutter app (flutter create
).
The app is built with fpdart
(functional programming) and riverpod
(state management).
To get started, you just need to fork the repository and install the packages:
flutter pub get
Note: Make sure to have Flutter installed (how to install?)
This is an extract of pubspec.yaml
showing the core dependencies used in the app:
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
equatable: ^2.0.5
fpdart: ^1.1.0
hooks_riverpod: ^2.3.6
riverpod_annotation: ^2.1.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
build_runner: ^2.4.4
custom_lint: ^0.4.0
riverpod_lint: ^1.3.2
riverpod_generator: ^2.2.3
mocktail: ^1.0.0
You also need to execute build_runner
to generate the providers using riverpod_generator
:
dart run build_runner build
You can then run the app in every platform (mobile, web, desktop, it's Flutter after all 🎯):
flutter run
The implementation is explained in details in a series of articles: Fpdart & Riverpod - Safe, maintainable, testable Flutter apps.
Note: The articles are work in progress, come back soon for more updates and added features (or subscribe to the newsletter for live updates)