fasq library
Entry point for the FASQ (Flutter Async State Query) package.
Exported APIs cover query/mutation primitives, caching, pagination, performance tooling, persistence, and Flutter widgets for integrating async data flows into applications.
Classes
- AutoRegisterSerializers
- Annotation to mark a class for automatic serializer registration.
- CacheConfig
- Configuration for the query cache.
- CacheDataCodecRegistry
- CacheDataCodecResult
-
CacheDataSerializer<
T> -
CacheEntry<
T> - Represents a cached data entry with metadata for staleness and eviction.
- CacheInfo
- Snapshot of cache state for inspection.
- CacheMetrics
- Metrics for monitoring cache performance.
- CircuitBreaker
- A circuit breaker that prevents repeated execution of operations likely to fail.
- CircuitBreakerOptions
- Configuration options for a circuit breaker.
- CircuitBreakerRegistry
- Registry for managing multiple circuit breaker instances with per-endpoint isolation.
- CircuitOpenEvent
- Event data structure for circuit open events.
- CircuitStats
- Statistics tracked by a circuit breaker for state transition decisions.
-
CursorPagination<
TData, TCursor> -
Dependent<
T> - EncryptionProvider
- Abstract interface for encryption/decryption operations.
- GlobalPerformanceConfig
- Global performance configuration for the cache system.
-
HotCache<
T> - A fast-access cache for frequently used items with LRU eviction.
- HotCacheOverallStats
- Overall statistics for the hot cache
- HotCacheStats
- Statistics for a specific hot cache entry
-
InfiniteQuery<
TData, TParam> - Manages infinite/paginated data fetching with support for forward and backward pagination.
-
InfiniteQueryOptions<
TData, TParam> -
InfiniteQueryState<
TData, TParam> - IsolatePool
- A pool of isolates for executing heavy computation tasks.
- IsolatePoolStatus
- Status information about an isolate pool
-
IsolateTask<
T, R> - A task wrapper for isolate execution.
-
Mutation<
T, TVariables> -
MutationBuilder<
T, TVariables> -
MutationHandler<
TData, TVariables> - MutationMeta
-
MutationOptions<
T, TVariables> -
MutationSnapshot<
TData, TVariables> -
MutationState<
T> - MutationTypeRegistry
- NetworkStatus
- OfflineMutationEntry
- OfflineQueueManager
-
Page<
TData, TParam> -
PageNumberPagination<
TData> - PerformanceMonitor
- Centralized performance monitoring service.
- PerformanceOptions
- Performance configuration options for a query.
- PerformanceReport
- Detailed performance report with comprehensive metrics.
- PerformanceSnapshot
- Snapshot of performance state at a specific point in time.
- PerformanceSummary
- Quick performance summary for monitoring dashboards
- PersistenceOptions
- Configuration options for cache persistence.
- PersistenceProvider
- Abstract interface for encrypted data persistence operations.
-
PrefetchConfig<
T> -
Query<
T> - A query represents an async operation with managed state and lifecycle.
-
QueryBuilder<
T> - A widget that executes an async operation and builds UI based on its state.
- QueryCache
- Core cache storage and management for queries.
- QueryClient
- Global registry for all queries in the application.
- QueryClientObserver
- QueryClientProvider
- Provider widget for QueryClient configuration.
- QueryKey
- QueryMeta
- QueryMetrics
- Metrics for a specific query's performance.
- QueryOptions
- Configuration options for a query.
-
QuerySnapshot<
T> -
QueryState<
T> - Represents the current state of a query.
- SecurityPlugin
- Abstract interface for security plugins.
- SecurityProvider
- Abstract interface for secure key storage operations.
- StringQueryKey
-
TypedQueryKey<
T>
Enums
- CircuitState
- The state of a circuit breaker.
- EvictionPolicy
- Policy for selecting which cache entries to evict when memory limit is reached.
- MutationStatus
- QueryStatus
- The status of a query's lifecycle.
Extensions
- JsonSerializableRegistry on CacheDataCodecRegistry
- QueryClientContext on BuildContext
- Extension on BuildContext to easily access QueryClient.
- StringQueryKeyExtension on String
Functions
-
logCircuitOpenEvent(
CircuitOpenEvent event) → void - Default logging callback for circuit open events.
-
whenReady<
T, R> (QueryState< T> state, R selector(T value)) → R?
Typedefs
-
CacheDataDecoder<
T> = T Function(Object? value) -
CacheDataEncoder<
T> = Object? Function(T value) - CircuitOpenCallback = void Function(CircuitOpenEvent event)
- Callback function signature for circuit open events.
-
CursorSelector<
TData, TCursor> = TCursor? Function(TData pageData) -
GetNextPageParam<
TData> = int? Function(TData lastPageData, int pageCount) -
GetPrevPageParam<
TData> = int? Function(TData firstPageData, int pageCount)
Exceptions / Errors
- CircuitBreakerOpenException
- Exception thrown when a request is made to an open circuit breaker.
- IsolateExecutionException
- Exception thrown when isolate execution fails
- IsolateTaskCancelledException
- Exception thrown when an isolate task is cancelled