like library

Link Intelligent Kernel Engine (LIKE) - A high-performance, 4-tier caching networking package for Flutter.

Classes

AppCacheManager
AppCacheSecurity
Handles AES-CBC encryption/decryption for the image cache.
AppCacheUtils
BaseStandardToastStyle
Base abstract class for built-in styles
BuiltInContainer
This widget help you to use the default behavior of the built-in toastification Items
BuiltInToastBuilder
CancelToken
Controls cancellation of Dio's requests.
ColorUtils
Utility class for color manipulation and conversion operations.
DefaultLikeToastDelegate
The default implementation of LikeToastDelegate using standard Material widgets.
DefaultLikeUnpacker
The default unpacker, assuming a "flat" structure or a common "data" wrapper.
DefaultStandardToastWidget
DefaultStyleValues
DefaultToastificationTransition
This class is responsible for creating the default animation for the toastification
EncryptedFileServiceResponse
EncryptedHttpFileService
FilledStandardToastStyle
FlatStandardColoredToastStyle
FlatStandardToastStyle
Like
Like
LikeAdHocSyncTask
A concrete implementation of LikeSyncTask that allows defining the work via an inline function or callback.
LikeApiResult<T>
Generic result wrapper for API responses. Note: Both 200 OK and 304 Not Modified are considered success states.
LikeARS
LikeAuthInterceptor
Interceptor to handle authentication tokens, 401 token refresh, and 429 rate limiting. Matches enterprise's AuthInterceptor parity.
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.
LikeConnectivityManager
Service to monitor network connectivity and server availability. Matches the exact logic and contract of enterprise's ConnectivityService.
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.
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.
LikeEvent<T>
A typed event emitted by the LikePipeline. Carries both the raw Response and potentially a ready-to-use mapped model.
LikeHelpers
Central helper utilities for the LIKE networking engine. Matches enterprise's ApiHelpers and NetworkUtils parity.
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.
LikeLoggerInterceptor
Interceptor to log all API requests and responses to console and disk. Matches enterprise's LoggerInterceptor parity.
LikeMockInterceptor
LikeMultiBuilder
LikeMultiBuilder
LikeMultipartFile
Model for raw bytes multipart files.
LikeMultiSliverBuilder
LikeMultiSliverBuilder
LikeNotifierState<T>
A class that encapsulates a LikeStateResponse and its associated CancelToken.
LikeOfflineSyncInterceptor
Interceptor that queues mutation requests (POST, PUT, DELETE, PATCH) when offline. Matches enterprise's OfflineSyncInterceptor parity.
LikeOfflineSyncManager
Orchestrates synchronization when connectivity is restored. Bridge between LikeConnectivityManager and LikeClient.
LikePerformanceInterceptor
Interceptor to track request performance. Matches enterprise's PerformanceInterceptor parity.
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.
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.
LikeRetryInterceptor
Intelligent retry interceptor with connectivity awareness. Matches enterprise's AppRetryInterceptor parity.
LikeSelector<N, T>
LikeSelector<N, T>
LikeSelectorSliver<N, T extends Object>
LikeSelectorSliver<N, T>
LikeService
Low-level service for interacting with LIKE's persistent Hive boxes. Handles caching, ETags, and the offline queue. Matches enterprise's NetworkBoxService parity.
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.
LikeStateResponseBuilder<T>
LikeStateResponseBuilder<T>
LikeStateResponseBuilderSliver<T extends Object>
LikeStateResponseBuilderSliver<T>
LikeSyncEvent
Represents a synchronization event broadcasted after a successful mutation.
LikeSyncManager
Manager for orchestrating background synchronization tasks with priority-based execution. Matches enterprise's SyncManager parity.
LikeSyncTask
A task to be executed by the LikeSyncManager. Refactored to an abstract class for better parity with enterprise's SyncTask.
LikeThrottlingInterceptor
Minimal throttling interceptor for simulating various network conditions in dev.
LikeToastConfig
Configuration for the LIKE toast system.
LikeToastDelegate
Delegate for handling Toast UI in the LIKE package. Allows users to provide custom designs for connectivity, success, and error toasts.
LikeToastManager
Centralized manager for handling toasts in the LIKE package. Uses a LikeToastDelegate to allow users to override the default UI.
LikeToastType
A central class that developers can use to define application-specific toast types. Fresh developers can create extensions on this class to add their own toast shortcuts.
LikeUnpackedResponse
A standardized container for unpacked API data.
LikeWhen<T>
LikeWhen<T>
MinimalStandardToastStyle
MinimalStandardToastWidget
MockController
MockRule
MultipartBytesFile
Represents a file to be uploaded as byte data in a multipart request.
Response<T>
The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
SimpleStandardToastStyle
SimpleStandardToastWidget
StandardStyleValues
StandardToastStyleFactory
StandardToastWidget
StandardToastWidgetFactory
ToastCloseButton
Configuration class for toast close button customization.
ToastContent
Creates the toastification content - title, description, progress bar
Toastification
This is the main class of the package. You can use this class to show and manage your notifications.
ToastificationCallbacks
A set of callbacks that you can provide to a Toastification widget. Used to listen for various events in the lifecycle of the Toastification. All of the callbacks are optional.
ToastificationConfig
you can use ToastificationConfig class to change default values of Toastification
ToastificationConfigProvider
This class is responsible for providing the ToastificationConfig to the widget tree
ToastificationItem
class to define the toastification item this class is the base model for the toastification item
ToastificationTheme
An inherited widget that defines the configuration for toastification themes in this widget's subtree.
ToastificationThemeData
A class that defines the theming data for Toastification widgets.
ToastificationType
Defines the visual and behavioral characteristics of built-in toast notifications. This class is used by the BuiltInBuilder to style and render different types of notifications with consistent appearance.
ToastificationWrapper
A wrapper widget that allows the show method to work without context. You can also provides Toastification configurations to its descendants.
ToastTimerAnimationBuilder
Using this class you can create your own animation for the timer of the toastification

Enums

CloseButtonShowType
Defines the visibility behavior of the toast close button.
LikeApiErrorType
High-level error types for the LIKE networking layer. Matches enterprise's ApiErrorType 1:1.
LikeLogLevel
LikeState
Represents the possible states of a network request or data stream.
LikeSyncPriority
Priority levels for background synchronization.
LikeSyncStatus
Status of the synchronization manager.
LikeToastAnimation
Supported animation types for LIKE toasts.
StandardStyle
enum to define the style of the built-in toastification
ToastificationStyle
Defines the visual style of built-in toast notifications.
ToastTimeStatus
enum to define the status of the timer of the toastification item init : the timer is not started yet started : the timer is started paused : the timer is paused stopped : the timer is stopped finished : the timer is finished

Mixins

LikeAutoReconnectMixin
A mixin that provides automatic reconnection and synchronization logic for Notifiers. Features a declarative syncWith API for intelligent data refreshes. Matches the exact logic and contract of enterprise's AutoReconnectMixin.

Extensions

IntColorComponents on Color
Extension on Color to provide integer-based color component access.
LikeApiResultFutureX on Future<LikeApiResult<Response>>
Extension to reduce boilerplate in repositories when dealing with Futures of results.
LikeConnectivityActions on LikeToastType
Default connectivity actions for LIKE toasts.
LikeStateResponseExtension on LikeStateResponse<T>
ToastStyleExtension on ToastificationStyle

Constants

defaultAlignment → const AlignmentDirectional
defaultClipBehavior → const Clip
defaultItemAnimationDuration → const Duration
defaultWidth → const double
errorColor → const Color
default color for error toastification
highModeShadow → const List<BoxShadow>
infoColor → const Color
LikeToast → const LikeToastType
Global accessor for LIKE toast types and actions.
lowModeShadow → const List<BoxShadow>
successColor → const Color
default color for success toastification
warningColor → const Color
default color for warning toastification

Properties

toastification Toastification
This is the main singleton class instance of the package. You can use this instance to show and manage your notifications.
final

Functions

defaultAnimationBuilderConfig(BuildContext context, Animation<double> animation, Alignment alignment, Widget child) Widget
Default animation builder for Toastification
defaultMarginBuilder(BuildContext context, AlignmentGeometry alignment) EdgeInsetsGeometry
Default margin builder for Toastification
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 disableLoadingToast = true, bool disableSuccessToast = false, bool disableErrorToast = false, bool disableExceptionToast = false, bool disableCancelledToast = true, bool enableHaptics = true, Map<LikeState, String>? messageOverrides}) Future<void>
updateNotifier<T>

Typedefs

ARS = LikeARS
Advanced Request Settings (ARS) for fine-grained network control. Mirrors the core enterprise network capabilities.
CloseButtonBuilder = Widget Function(BuildContext context, VoidCallback onClose)
Signature for a function that builds a custom close button widget.
LikeModelFactory<T> = T Function(dynamic json)
Function signature for creating models from JSON.
ToastificationAnimationBuilder = Widget Function(BuildContext context, Animation<double> animation, Alignment alignment, Widget child)
type definition for the animation builder of the custom toastification use this builder to create your own toastification animation
ToastificationBuilder = Widget Function(BuildContext context, ToastificationItem holder)
type definition for the builder of the custom toastification use this builder to create your own toastification widget
ToastificationMarginBuilder = EdgeInsetsGeometry Function(BuildContext context, AlignmentGeometry alignment)