zenify library
Zenify - Modern Flutter state management
Clean, simple, powerful.
Classes
- Obx
- A widget that automatically rebuilds when any Rx value used in the builder changes
- QueryKey
- Utility to normalize query keys into stable strings
-
Ref<
T> - Universal reference to any dependency - one type for all use cases
-
Rx<
T> - A reactive value holder that uses Flutter's ValueNotifier under the hood
- RxCircuitBreaker
- Circuit breaker for reactive operations
-
RxComputed<
T> - A computed reactive value that automatically updates when its dependencies change
- RxErrorConfig
- Error handling configuration
- RxErrorUtils
- Utility functions for error handling
-
RxFailure<
T> - Failure result
-
RxFuture<
T> - A reactive wrapper for Future operations with state management
- RxInterval
- Reactive interval that emits values at regular intervals
- RxLogger
- Centralized logging utility for the reactive system
-
RxResult<
T> - Result wrapper for operations that can fail
-
RxSuccess<
T> - Success result
-
RxTester<
T> - Test utility for tracking changes to Rx values
- RxTesting
- Testing utilities for reactive values
- RxTimer
- Create a reactive timer that counts down
- RxTimingUtils
- Global timing utilities for reactive values
- Zen
- Main Zenify API for dependency injection
-
ZenBuilder<
T extends ZenController> - Widget that automatically manages a ZenController's lifecycle
- ZenCancelToken
- A token that can be used to signal cancellation to async operations.
- ZenConfig
- Configuration settings for Zenify framework
-
ZenConsumer<
T> - Widget that efficiently accesses dependencies from the current scope with automatic caching to avoid repeated lookups on rebuilds
- ZenController
- Base controller class with automatic memory leak prevention and smart DI
-
ZenControllerScope<
T extends ZenController> - A widget that creates and manages a controller's lifecycle.
- ZenDebug
- Debugging and introspection utilities
-
ZenEffect<
T> - A reactive effect that manages async operations with loading, data, and error states Uses the Zen reactive system for consistent API and optimal performance
-
ZenEffectBuilder<
T> - A widget that responds to different states of a ZenEffect.
-
ZenInfiniteQuery<
T> - A specialized query for infinite scrolling / pagination.
- ZenLifecycleManager
- Manages lifecycle events for controllers
- ZenLogger
- Logging utility for Zenify framework
- ZenMetrics
- Performance and usage metrics for Zenify
- ZenModule
- Abstract class for organizing related dependencies into modules
- ZenModuleRegistry
- Clean module registry - fail-fast approach
-
ZenMutation<
TData, TVariables> - A reactive mutation that manages async data updates (creates/updates/deletes)
-
ZenQuery<
T> - A reactive query that manages async data fetching with caching and cancellation
-
ZenQueryBuilder<
T> - A widget that builds itself based on the state of a ZenQuery.
- ZenQueryCache
- Global cache manager for ZenQuery instances
-
ZenQueryConfig<
T> - Configuration for ZenQuery
- ZenReactiveSystem
- Production-ready reactive system for the DI container
- ZenRoute
- A stateful widget that creates a ZenScope, initializes a ZenModule, and provides the scope to its child widget tree.
- ZenRouteObserver
- Navigator observer that automatically disposes controllers when routes are popped and allows for custom route change callbacks
- ZenScope
- Dependency scoping mechanism for hierarchical access to dependencies Clean core implementation - debugging utilities moved to debug package
- ZenScopeInspector
- Debugging and introspection utilities for ZenScope Separated from core functionality to keep ZenScope clean
- ZenScopeManager
- Comprehensive scope manager with lifecycle management and hierarchy navigation Handles both scope creation/disposal and hierarchy traversal operations
- ZenScopeStackTracker
- Stack-based scope parent tracking for reliable hierarchical scope inheritance
- ZenScopeWidget
- A widget that provides a ZenScope to its descendants.
- ZenService
- ZenStorage
- Interface for persisting query data.
-
ZenStreamQuery<
T> - A reactive query wrapper for Streams.
-
ZenStreamQueryBuilder<
T> - A widget that builds itself based on the state of a ZenStreamQuery.
- ZenSubscription
- Enhanced subscription with automatic cleanup and state tracking
- ZenTestContainer
- Test container for integration and widget testing
- ZenTestController
- Test-specific controller base class with additional utilities
- ZenTestMode
- Test mode utilities for easy mocking and test setup
- ZenTestScope
- Widget for wrapping test widgets with the test container
- ZenTestUtils
- Utility functions for testing
-
ZenView<
T extends ZenController> - Base class for views with automatic controller binding.
- ZenWorkerGroup
- Group of workers that can be disposed together
- ZenWorkerHandle
- Handle for controlling worker lifecycle
- ZenWorkers
- Clean, composable ZenWorkers API with improved type inference and pause/resume support
Enums
- LogLevel
- Log level enum for custom handlers
- WorkerType
- Defines the different types of reactive workers
- ZenEnvironment
- Predefined environment configurations for Zenify
- ZenLogLevel
- Log levels for Zenify framework logging
- ZenMutationStatus
- Status of a mutation
- ZenQueryStatus
- Status of a ZenQuery
Mixins
- ZenDIIntegration
- Mixin for DI integration hooks
- ZenTickerProvider
Extensions
- BoolObsExtension on bool
- DoubleObsExtension on double
- FluentExtension on T
-
Extension to add the
alsomethod for fluent API - IntObsExtension on int
-
ListObsExtension
on List<
T> -
MapObsExtension
on Map<
K, V> - ObsExtension on T
- General extension method for creating reactive values
-
RxAsyncErrorHandling
on Rx<
T> - Async error handling extensions
-
RxBoolExtensions
on Rx<
bool> - Extensions for reactive booleans
- RxCombine on Never
-
RxComputedExtensions
on Rx<
T> -
RxDoubleExtensions
on Rx<
double> - Extensions for reactive doubles
-
RxErrorHandling
on Rx<
T> - Error handling extensions for reactive values
-
RxIntExtensions
on Rx<
int> - Extensions for reactive integers
-
RxListExtensions
on Rx<
List< T> > - Reactive list extensions with comprehensive error handling
-
RxListTransformations
on Rx<
List< T> > - Collection transformation extensions
-
RxMapExtensions
on Rx<
Map< K, V> > - Enhanced reactive map operations with comprehensive error handling
-
RxNullableErrorHandling
on Rx<
T?> - Error handling for nullable reactive values
-
RxNullableTransformations
on Rx<
T?> - Extensions for nullable reactive values
-
RxPerformanceExtensions
on Rx<
T> - Performance tracking extensions for reactive values
-
RxSetExtensions
on Rx<
Set< T> > - Enhanced reactive set operations with comprehensive error handling
-
RxStringExtensions
on Rx<
String> - Extensions for reactive strings
-
RxTimingExtensions
on Rx<
T> - Timing extensions for reactive values
-
RxTransformations
on Rx<
T> - Transformation extensions for reactive values
-
SetObsExtension
on Set<
T> - StringObsExtension on String
- ZenControllerAdvancedExtension on ZenController
- Advanced extension for specialized worker patterns
- ZenControllerWorkerExtension on ZenController
- Extension for more fluent worker creation and control
-
ZenEffectWatch
on ZenEffect<
T> - Extension for easy effect watching with your worker system
- ZenModulePageExtensions on BuildContext
- Extension methods for convenient scope access from BuildContext
- ZenScopeExtension on BuildContext
- Extension methods for BuildContext to find a ZenScope.
- ZenScopeQueryExtension on ZenScope
- Extension methods for ZenScope to simplify scoped query registration.
- ZenTestingExtension on Zen
- Extension on Zen class to provide test mode access
- ZenViewContextExtensions on BuildContext
- Context extension for nested widgets
-
ZenViewExtension
on ZenView<
T> - Controller access extension
Functions
-
computed<
T> (T computation()) → RxComputed< T> -
createEffect<
T> ({required String name}) → ZenEffect< T> - Helper function to create effects (similar to createEffect in other frameworks)
-
getRxErrorConfig(
) → RxErrorConfig - Get current error configuration
-
rxBool(
[bool initial = false]) → Rx< bool> - Creates a reactive boolean value
-
rxDouble(
[double initial = 0.0]) → Rx< double> - Creates a reactive double value
-
rxInt(
[int initial = 0]) → Rx< int> - Creates a reactive integer value
-
rxList<
T> ([List< T> ? initial]) → Rx<List< T> > - Creates a reactive list
-
rxMap<
K, V> ([Map< K, V> ? initial]) → Rx<Map< K, V> > - Creates a reactive map
-
rxnBool(
[bool? initial]) → Rx< bool?> -
rxnDouble(
[double? initial]) → Rx< double?> -
rxnInt(
[int? initial]) → Rx< int?> -
rxnString(
[String? initial]) → Rx< String?> -
rxSet<
T> ([Set< T> ? initial]) → Rx<Set< T> > - Creates a reactive set
-
rxString(
[String initial = '']) → Rx< String> - Creates a reactive string value
-
setRxErrorConfig(
RxErrorConfig config) → void - Set global error handling configuration
-
zenTestMode(
) → ZenTestMode - Helper function to access test mode (alternative to extension)
Typedefs
-
RxBool
= Rx<
bool> -
RxDouble
= Rx<
double> -
RxInt
= Rx<
int> -
RxList<
T> = Rx< List< T> > -
RxMap<
K, V> = Rx< Map< K, V> > -
RxnBool
= Rx<
bool?> -
RxnDouble
= Rx<
double?> -
RxnInt
= Rx<
int?> -
RxnString
= Rx<
String?> -
RxSet<
T> = Rx< Set< T> > -
RxString
= Rx<
String> -
ZenQueryFetcher<
T> = Future< T> Function(ZenCancelToken cancelToken) - Function signature for data fetching with cancellation support
Exceptions / Errors
- RxException
- Exception thrown when reactive value operations fail
- ZenCancellationException
- Exception thrown when an operation is cancelled