Installation
Add Fasq to your Flutter project. You can use the core package alone or add one of the optimized adapters for your preferred state management solution.
Core Package
Section titled “Core Package”The core package provides the QueryBuilder, MutationBuilder, and all underlying caching functionality.
flutter pub add fasqState Management Adapters
Section titled “State Management Adapters”If you are already using a state management library, we highly recommend using the corresponding adapter for a more integrated and idiomatic experience.
Riverpod Adapter (Recommended)
Section titled “Riverpod Adapter (Recommended)”flutter pub add fasq_riverpodBloc Adapter
Section titled “Bloc Adapter”flutter pub add fasq_blocHooks Adapter
Section titled “Hooks Adapter”flutter pub add fasq_hooksEcosystem & Security
Section titled “Ecosystem & Security”Security Package
Section titled “Security Package”For enterprise-grade encryption and secure SQL persistence:
flutter pub add fasq_securitySerializer Generator
Section titled “Serializer Generator”To automate type-safe query serialization and eliminate boilerplate:
flutter pub add -d fasq_serializer_generator build_runnerGetting Started
Section titled “Getting Started”- Install the dependencies using the commands above.
- Import the packages in your Dart files:
- Import the packages you need:
// Core packageimport 'package:fasq/fasq.dart';
// Adapters (if using)// import 'package:fasq_hooks/fasq_hooks.dart';// import 'package:fasq_bloc/fasq_bloc.dart';// import 'package:fasq_riverpod/fasq_riverpod.dart';Compatibility
Section titled “Compatibility”Fasq requires:
- Flutter: 3.10.0 or higher
- Dart: 3.0.0 or higher