testing library

Explicit testing surface for exercising the real LIKE networking stack. Import this entrypoint in tests instead of private src paths. Construct a scoped client, replace its Dio HttpClientAdapter, and dispose it per test.

Classes

AppCacheManager
AppCacheUtils
CancelToken
Controls cancellation of Dio's requests.
DefaultLikeReplayCodec
Snapshots multipart bytes so replay does not depend on a temporary file path.
DefaultLikeUnpacker
The default unpacker, assuming a "flat" structure or a common "data" wrapper.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
JsonParse
Comprehensive utility class for safe JSON field parsing.
Like
Like
LikeApiResult<T>
LikeARS
LikeAuthConfig
Configuration for authentication token providers, refresh handlers, and logout callbacks.
LikeAuthInterceptor
Interceptor to handle authentication tokens, 401 token refresh, and 429 rate limiting. Matches enterprise's AuthInterceptor parity.
LikeBaseApiService
LikeBuilder<T>
LikeBuilder<T>
LikeCacheImage
LikeCacheImage
LikeCacheInterceptor
Interceptor that persists successful GET responses to the L2 Hive cache. Matches enterprise's CacheInterceptor parity.
LikeClient
The central entry point for all network requests in the LIKE engine.
LikeClientConfig
Configuration for creating an isolated, scoped LikeClient instance.
LikeClientFactory
Factory to create and configure a Dio instance with all LIKE interceptors. Matches enterprise's DioFactory parity.
LikeConfig
Global configuration for the LIKE engine's behavior and caching system.
LikeConnectivityCheckResult
Structured snapshot produced by a LIKE connectivity check.
LikeConnectivityInterceptor
Interceptor that checks connectivity before every request. Fails fast with DioExceptionType.connectionError if offline to avoid long timeouts.
LikeConnectivityManager
Service that monitors interface, internet, and origin-aware server reachability.
LikeConnectivityTransition
Describes a meaningful reachability transition for one canonical API origin.
LikeConstants
Centralized configuration and constants for the LIKE networking engine. Provides production-grade networking configuration parity.
LikeDataUnpacker
Defines how raw API responses (envelopes) are parsed and mapped.
LikeDiagnostics
LikeError
A unified error model for all network operations. Matches the exact logic and contract of enterprise's ApiError.
LikeErrorHandler
Handles conversion of various errors (Dio, Socket, etc.) into unified LikeError. Matches the exact categorization and user-friendly messaging logic of enterprise's ErrorHandler.
LikeEtagInterceptor
Interceptor to handle HTTP ETag (Entity Tag) caching. Matches enterprise's ETagInterceptor parity.
LikeHttpClient
Injectable HTTP boundary for services. Implement or mock this contract in unit tests without initializing Hive, connectivity, or the default client. Implementations own their lifecycle; services never dispose injected clients.
LikeInfiniteScroll
LikeInfiniteScroll
LikeInvalidationEvent
LikeInvalidationHub
Application data events only: no payloads, credentials or diagnostic logging.
LikeLogger
Professional logging service for the LIKE networking engine. Supports disk logging, tiered console levels, and api event tracking. Matches the exact logic and feature set of enterprise's LoggerService.
LikeMockInterceptor
LikeMockScenario
Versioned, persistent scenarios use synthetic payloads only. Safe export strips matching credentials and opaque response values before sharing with others.
LikeNetworkQualityInterceptor
Measures real HTTP attempts using a monotonic clock; ignores cached results, cancellations and local failures. Works without browser-specific APIs.
LikeNetworkQualityMonitor
Instance-owned monitor; inject it for deterministic tests and scoped clients.
LikeNetworkQualitySample
Passive API-path measurements, not a device-wide internet speed test.
LikeOfflineSyncInterceptor
Queues explicitly eligible mutation requests after ambiguous network errors.
LikeOfflineSyncManager
Orchestrates synchronization when connectivity is restored. Bridge between LikeConnectivityManager and LikeClient.
LikeOfflineTask
Metadata-only queue view. Bodies and credentials are deliberately excluded.
LikeOptimisticStore<T>
Ordered optimistic layers prevent an older rollback from overwriting a newer successful mutation. Reconciliation reducers should merge server entities by ID.
LikePagedQuery<T>
Page storage remains separate from the de-duplicated view, so replacing a page cannot shift another page's offsets. Failed pages retain their cursor for retry.
LikePageSnapshot<T>
LikePaginatedResponse<T>
Immutable paginated state snapshot that can be managed by any state management solution (Provider, Riverpod, BLoC/Cubit, GetX, MobX, or LikeChangeNotifier).
LikePipeline
A reactive event bus for the LIKE networking engine. Broadcasts successful network events (including cache and SWR) to observers. Matches enterprise's NetworkPipeline parity.
LikePipelineInterceptor
Interceptor to automatically emit successful responses to the LikePipeline. Matches enterprise's PipelineInterceptor parity.
LikeQuery<T>
Framework-independent query lifecycle shared by every presentation adapter.
LikeQueryNotifier<T>
Provider/ValueListenable adapter. The owner chooses whether it owns the query.
LikeRedaction
Sanitizes diagnostic copies only; application responses are never modified.
LikeReplayCodec
LikeRequestConfig
Per-request network configuration overrides for the LIKE engine.
LikeRequestRegistry
Registry to track in-flight requests and session-stale keys (L1 Memory Cache). Matches enterprise's RequestRegistry parity.
LikeRequestTrace
Deliberately has no URL path/query, headers, bodies, error text or credentials.
LikeResourceIndex
LikeRetryInterceptor
Performs bounded, request-local retries for safe transport failures.
LikeRetryPolicy
Bounded positive jitter: never retry before the server's requested minimum.
LikeService
Low-level service for interacting with LIKE's persistent Hive boxes. Handles caching, ETags, and the offline queue. Matches enterprise's NetworkBoxService parity.
LikeSessionIdentity
Shared cache identity used by L1, persistent cache and ETags.
LikeSessionInterceptor
Rejects stale requests before they can acquire another session's credentials.
LikeSessionScope
Stable identity supplied by the application after authentication. Never use an access token as accountId: tokens rotate independently of users.
LikeSliverBuilder<T extends Object>
LikeSliverBuilder<T>
LikeStateResponse<T>
The State Engine of the LIKE package. Manages the lifecycle of a request, including SWR and background refreshes.
LikeSyncManager
Manager for orchestrating background synchronization tasks with priority-based execution. Matches enterprise's SyncManager parity.
LikeToastConfig
Configuration for user toast/notification callbacks in the LIKE network engine.
LikeTraceCaptureInterceptor
LikeTraceContext
Mutable operation-local metadata only. It is never persisted or exported.
LikeUnpackedResponse
A standardized container for unpacked API data.
LikeWebSocketClient
Managed WebSocket client for the LIKE package.
LikeWhen<T>
LikeWhen<T>
MockController
MockRule
MultipartBytesFile
Represents a file to be uploaded as byte data in a multipart request.
Options
The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
PaginationTool<T>
Generic state, parsing, and calculations for page-based and cursor-based pagination.
RequestOptions
The internal request option class that is the eventual result after BaseOptions and Options are composed.
Response<T>
The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.

Enums

LikeApiErrorType
High-level error types for the LIKE networking layer. Matches enterprise's ApiErrorType 1:1.
LikeConnectivityCheckReason
Describes why a connectivity check was started.
LikeLogLevel
LikeMockFailure
LikeNetworkQuality
LikeOfflineTaskStatus
LikeResponseSource
LikeState
Represents the possible states of a network request or data stream.
LikeStorageStatus
Diagnostic status of LIKE's persistent Hive storage backend.
LikeSyncPriority
Priority levels for background synchronization.
LikeSyncStatus
Status of the synchronization manager.
LikeTracePhase

Mixins

LikeChangeNotifier
Lightweight ChangeNotifier mixin for individual request execution.
LikeScreenMixin<T extends StatefulWidget>
Unified screen-level State mixin combining route/tab visibility tracking with connectivity and origin-reachability callbacks.
LikeStateMixin
A mixin that provides automatic reconnection, data pipeline binding, and state management for Notifiers.

Extensions

ApiResultFutureX on Future<ApiResult<Response>>
Extension to reduce boilerplate in repositories when dealing with Futures of results.
LikeDateTimeExtension on DateTime
DateTime extension utilities available on non-nullable DateTime.
LikeNumExtension on num?
Null-safe Number extension utilities available on both num and num?.
LikeStateResponseExtension on LikeStateResponse<T>
LikeStringExtension on String?
Null-safe String extension utilities available on both String and String?.

Properties

likeRouteObserver → RouteObserver<ModalRoute<void>>
Global route observer for LikeScreenMixin. Must be added to MaterialApp.navigatorObservers.
final

Functions

jsonMap(Object? value) → Map<String, dynamic>
Helper function to safely cast/convert dynamic value to Map<String, dynamic>.
likeWhenNotifier<T extends Object>({required LikeStateResponse response, Future<void> onSuccess(T data)?, Future<void> onError(LikeError error)?, Future<void> onException(String message)?, Future<void> onInit(LikeState state)?}) → Future<void>
likeWhenNotifier<T>
updateNotifier<T extends Object>({required LikeStateResponse response, BuildContext? context, Future<void> onInit(LikeState state)?, Future<void> onSuccess(T data)?, Future<void> onError(LikeError error)?, Future<void> onException(String message)?, bool enableHaptics = true}) → Future<void>
updateNotifier<T>

Typedefs

ApiResult<T> = LikeApiResult<T>
Generic result wrapper for API responses. Note: Both 200 OK and 304 Not Modified are considered success states.
ARS = LikeARS
Advanced Request Settings (ARS) for fine-grained network control. Mirrors the core enterprise network capabilities.
BaseApiService = LikeBaseApiService
LikeInterfaceCheck = Future<List<ConnectivityResult>> Function()
Injectable connectivity interface check used by tests and embedders.
LikeInternetCheck = Future<bool> Function(String host, Duration timeout)
Injectable internet reachability check.
LikeModelFactory<T> = T Function(dynamic json)
Function signature for creating models from JSON.
LikeServerCheck = Future<bool?> Function(String host, int port, Duration timeout)
Injectable origin reachability check.
Pagination<T> = PaginationTool<T>
Backward compatibility alias for PaginationTool.
StateMixin = LikeStateMixin
Shorter alias for LikeStateMixin.
StateResponse<T> = LikeStateResponse<T>
A shorter, cleaner alias for LikeStateResponse.
States = LikeState
A shorter, cleaner alias for LikeState.