core_kit_internal library

Internal library exports - for use within core_kit package only. Do not import this in external code.

Classes

AndroidOptions
Specific options for Android platform.
AppleOptions
Specific options for Apple platform.
BackgroundTransformer
The default Transformer for Dio.
BaseOptions
A set of base settings for each Dio(). BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
BytesLoader
An interface that can be implemented to support decoding vector graphic binary assets from different byte sources.
Cache
The cache for decoded SVGs.
CancelToken
Controls cancellation of Dio's requests.
CkAlert
CkAppBar
CkAppBarConfig
CkAppleAuthConfig
Apple Sign-In configuration
CkAppleAuthData
CkAuth<TProfile>
Static developer-facing gateway for authentication operations. Eliminates the need to use CkAuthService.instance directly.
CkAuthConfig<TProfile>
Main auth configuration for CkAuthService.
CkAuthEndpoints
CkAuthExtractors
Maps CkResponse.data (dynamic) to tokens, profile, and messages.
CkAuthFlowHandlers
Developer provides callbacks — CoreKit triggers them automatically. Completely avoids forcing any navigation system on the developer.
CkAuthLoadingController
Manages per-operation loading state using CkBehaviorStream.
CkAuthResult<T>
Result wrapper for CkAuthService operations (sign-in, OTP, profile, social).
CkAuthStateController
Pure Dart stream-based auth state. New subscribers immediately receive the current state.
CkAuthStorageKeys
CkBehaviorStream<T>
A stream that caches the latest value and replays it to new listeners. Pure Dart — no Flutter dependency, no state management lock-in.
CkButton
CkCityDropDown
A dropdown widget for selecting cities of a country and state.
CkCommentSheet<T>
A generic, recursively-nested comment/reply list with built-in expand/collapse-replies state, connector-line drawing, and pagination — built on top of CkListView for the outer scroll/refresh/load-more mechanics.
CkCountryPicker
CkCountryPickerNameBuilderProperty<T>
CkCustomSocialAuthConfig
For any OAuth/social provider not covered by built-in ones
CkDateInputTextField
CkDebouncer
CkDeviceId
A stable per-device identifier that survives app uninstall/reinstall.
CkDottedBorder
CkDraggableBottomSheet
CkDropDown<T>
CkDropDownNameBuilderProperty<T>
CkFacebookAuthConfig
Facebook Sign-In configuration
CkFacebookAuthData
CkForm
CkFormBuilder<T>
CkGoogleAuthConfig
Google Sign-In configuration Developer provides: backend URL + what to extract from Google + what to send to backend
CkGoogleAuthData
Data received from Google after successful Google Sign-In
CkGridChildInfo
CkGridConfig
CkGridView
CkImage
CkImagePicker
CkInputConfig
Global design configuration shared by CkTextField and CkMultilineTextField.
CkListLoaderConfig
Global configuration for list/grid loader widgets. Allows customizing the default loading indicator and "no more data" widget both globally (via CoreKitConfig) and per-instance.
CkListView
CkLoader
CkLogger
CkLoginRequest
Request configuration payload returned by loginRequestBuilder.
CkMultiImagePickerFormField
CkMultilineHintLimitBuilder
CkMultilineTextField
CkMultipleSelector
CkOtpConfig
OTP configuration — null means no OTP flow
CkPermissionHandler
CkPermissionHelper
A helper class for handling permission requests.
CkPermissionHelperConfig
CkPhoneNumberTextField
CkPopupMenu<T>
CkPopupMenuProperty<T>
CkPopupMenuTriggerProperty<T>
CkProfileExtractor<TProfile>
Profile cache and CkBehaviorStream for CkAuthService.
CkRadioFormField
CkRadioGroup
A theme-aware radio group that accepts a Map of options where
CkRadioGroupFormField<T>
CkRatingBar
CkResponse<T>
A generic typed response wrapper returned by CkTransport.request.
CkResponseExtractor
CkRichText
CkRichTextContent
CkRichTextSpan
CkScreenshotPreview
CkScreenUtils
CkSearch
CkSelectableButton
CkShare
CkSimpleRichTextContent
CkSnackBarConfig
Global configuration for the CkSnackBar custom overlay widget.
CkSocialLoginConfig
Social login configuration — entirely optional. Only providers with non-null configs are available.
CkSpotlight
CkSpotlightAdvanced
CkStateDropDown
A dropdown widget for selecting states/provinces of a country.
CkStateDropDownItemProperty
CkStorage
Secure storage with guaranteed fallback + zero-latency in-memory cache.
CkTabBar
CkTabConfig<T>
CkTabContext<T>
CkTabListView<T>
CkText
CkTextField
CkTokenProvider
Bridges stored tokens to CkTransport. Created by CoreKit / CkAuthService — not configured in app code.
CkTransport
CkTransportConfig
Configuration for CkTransport — the HTTP client used by core_kit.
CkUtils
ColorMapper
A class that transforms from one color to another during SVG parsing.
CoreKit
The root widget for a CoreKit-powered Flutter app (standard navigator).
CoreKitConfig
Abstract configuration class that every app must extend to initialise CoreKit.
CoreKitInstanceSingleton
CoreKitRouterGate
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
Dio
Dio enables you to make HTTP requests easily.
DioMixin
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
FlutterSecureStorage
A class to manage secure storage in a Flutter application across multiple platforms.
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON. If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions, this transformer is significantly faster than the default SyncTransformer and the BackgroundTransformer. This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response, which is faster than decoding the utf8-encoded JSON in two separate steps, since Dart uses a special fast decoder for this case. See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
Headers
The headers class for requests and responses.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
ImagePicker
Provides an easy way to pick an image/video from the image library, or to take a picture/video with the camera.
Interceptor
Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
Interceptors
A Queue-Model list for Interceptors.
InterceptorsWrapper
A helper class to create interceptors in ease.
IOSOptions
Specific options for iOS platform. Currently there are no specific ios options available, but only shared options from apple options.
LinuxOptions
Specific options for Linux platform. Currently there are no specific linux options available.
ListParam<T>
Indicates a param being used as queries or form data, and how does it gets formatted.
LoginCallback
LogInterceptor
LogInterceptor is used to print logs during network requests. It should be the last interceptor added, otherwise modifications by following interceptors will not be logged. This is because the execution of interceptors is in the order of addition.
LostData
The response object of ImagePicker.retrieveLostData.
LostDataResponse
The response object of ImagePicker.getLostData.
MacOsOptions
Specific options for macOS platform. Extends AppleOptions and adds the usesDataProtectionKeychain parameter.
MultipartFile
An upload content that is a part of MultipartRequest. This doesn't need to correspond to a physical file.
Options
The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
PasswordObscureIcon
Configures the password visibility toggle icons shown in text fields.
Permission
Defines the permissions which can be checked and requested.
PermissionHadlerColors
Colours used by the permission request UI overlay.
PermissionWithService
A special kind of permission, used to access a service.
PickedFile
A PickedFile is a cross-platform, simplified File abstraction.
PictureInfo
The decoded result of a vector graphics asset.
PictureProvider
Deprecated class, will be removed, does not do anything.
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
RedirectRecord
A record that records the redirection happens during requests, including status code, request method, and the location.
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after BaseOptions and Options are composed.
ResendOtpCallBack
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.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
Svg
A utility class for decoding SVG data to a DrawableRoot or a PictureInfo.
SvgAssetLoader
A BytesLoader that decodes and parses an SVG asset in an isolate and creates a vector_graphics binary representation.
SvgBytesLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string from a Uint8List in an isolate and creates a vector_graphics binary representation.
SvgCacheKey
A SvgTheme aware cache key.
SvgFileLoader
A BytesLoader that decodes SVG data from a file in an isolate and creates a vector_graphics binary representation.
SvgLoader<T>
A BytesLoader that parses a SVG data in an isolate and creates a vector_graphics binary representation.
SvgNetworkLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string the network in an isolate and creates a vector_graphics binary representation.
SvgPicture
A widget that will parse SVG data for rendering on screen.
SvgStringLoader
A BytesLoader that parses an SVG string in an isolate and creates a vector_graphics binary representation.
SvgTheme
A theme used when decoding an SVG picture.
SyncTransformer
If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the transformer by setting the Dio.transformer.
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
VectorGraphicUtilities
Utility functionality for interaction with vector graphic assets.
VerifyOtpCallBack
WebOptions
Specific options for web platform.
WindowsOptions
Specific options for Windows platform.
XFile
A CrossFile is a cross-platform, simplified File abstraction.

Enums

AccessControlFlag
Keychain access control flags that define security conditions for accessing items. These flags can be combined to create complex access control policies.
AndroidBiometricType
Controls which authentication methods are accepted when biometric authentication is used.
CameraDevice
Which camera to use when picking images/videos while source is ImageSource.camera.
CkAuthLoadingType
Types of auth operations that can have loading states.
CkAuthStatus
CkBorderType
CkDropDownType
CkOtpTrigger
CkOtpVerificationStrategy
CkSendButtonPosition
Where the send button is rendered relative to the composer text box.
CkSnackBarPosition
Defines the screen position where the CkSnackBar is displayed.
CkSnackBarType
CkSocialProvider
CkValidationType
DioExceptionType
The exception enumeration indicates what type of exception has happened during requests.
FileAccessMode
The file access mode when downloading a file, corresponds to a subset of dart:io::FileMode.
ImageSource
Specifies the source where the picked image should come from.
KeychainAccessibility
KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
KeyCipherAlgorithm
Algorithm used to encrypt/wrap the secret key in Android KeyStore.
ListFormat
Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
PermissionStatus
Defines the state of a Permission.
ResponseType
Indicates which transformation should be applied to the response data.
RetrieveType
The type of the retrieved data in a LostDataResponse.
ServiceStatus
Defines the different states a service can be in.
StorageCipherAlgorithm
Algorithm used to encrypt stored data.

Mixins

CoreKitConfigDefaults
OptionsMixin
The mixin class for options that provides common attributes.

Extensions

Alignments on Widget
AspectRatioExtension on Size
AspectRatioRecord on (num, num)
AsyncTryCatch on dynamic Function()
CkScreenUtilExtension on num
EdgeInsetsGeometryResponsive on EdgeInsetsGeometry
EdgeInsetsResponsive on EdgeInsets
EnumDisplayName on Enum
FormStateX on GlobalKey<FormState>
FuturePermissionStatusGetters on Future<PermissionStatus>
Utility getter extensions for the Future<PermissionStatus> type.
FutureServiceStatusGetters on Future<ServiceStatus>
Utility getter extensions for the Future<ServiceStatus> type.
GapExtension on int
ListXFileToMultipart on List<XFile>
NullableTimeOfDayParser on String?
PermissionActions on Permission
Actions that can be executed on a permission.
PermissionCheckShortcuts on Permission
Shortcuts for checking the status of a Permission.
PermissionListActions on List<Permission>
Actions that can be taken on a List of Permissions.
PermissionStatusGetters on PermissionStatus
Utility getter extensions for the PermissionStatus type.
Responsive on int
ResponsiveDouble on double
ServicePermissionActions on PermissionWithService
Actions that apply only to permissions that have an associated service.
ServiceStatusGetters on ServiceStatus
Utility getter extensions for the ServiceStatus type.
StringCasingExtension on String
StringExtensions on String
StringToTimeOfDay on String
TimeFormater on DateTime
TimeOfDayParser on String
TimeOfDayString on TimeOfDay
Context-FREE extensions – work anywhere!
View on num
WidgetAspectRatio on Widget
WidgetMarginX on Widget
Add margin property to widget
WidgetPaddingX on Widget
WidgetSliverBoxX on Widget
Allows you to insert widgets inside a CustomScrollView
XFileToMultipart on XFile

Constants

kTypeImage → const String
Denotes that an image is being picked.
kTypeVideo → const String
Denotes that a video is being picked.
vg → const VectorGraphicUtilities
The VectorGraphicUtilities instance.

Properties

coreKitInstance CoreKitInstanceSingleton
no setter
getTheme ThemeData
no setter
lastSubmitAuthData Map<String, dynamic>
getter/setter pair
svg Svg
Instance for Svg's utility methods, which can produce a DrawableRoot or PictureInfo from String or Uint8List.
final

Functions

ckApiDebug(String message, {String? tag}) → void
Global shortcut for CkLogger.apiDebug
ckApiError(String message, {String? tag}) → void
Global shortcut for CkLogger.apiError
ckDebug(String message, {String? tag}) → void
Global shortcut for CkLogger.debug
CkDialog({required Widget child, required BuildContext context, bool isDismissible = false}) Future
CkDialogWithActions({required List<Widget> content, required BuildContext context, required String title, String? subTitle, bool isDismissible = true, bool validationRequired = false, required dynamic onConfirm(), dynamic onCancel()?, String action = 'Confirm', String cancel = 'Cancel'}) Future
ckError(String message, {String? tag}) → void
Global shortcut for CkLogger.error
ckInfo(String message, {String? tag}) → void
Global shortcut for CkLogger.info
ckScreen(String message, {String? tag}) → void
Global shortcut for CkLogger.screen
CkSnackBar(String text, {required CkSnackBarType type, Duration? customDuration}) → void
ckWarning(String message, {String? tag}) → void
Global shortcut for CkLogger.warning
defaultDioExceptionReadableStringBuilder(DioException e) String
The default implementation of building a readable string of DioException.
openAppSettings() Future<bool>
Opens the app settings page.

Typedefs

CkAvatarSizeForDepth = double Function(int depth)
Returns the avatar size to use at a given nesting depth (0 = top level).
CkCommentAvatarBuilder<T> = Widget Function(T item, int depth)
Builds the avatar for item. Fully self-contained, including its own tap handling (e.g. navigating to a profile screen) if any.
CkCommentContentBuilder<T> = Widget Function(BuildContext context, T item, int depth)
Builds everything for item except the avatar, reaction row and reply action (those are separate builders below) — typically the name/header row, the comment text and any attached media.
CkCommentReactionBuilder<T> = Widget Function(T item)
Builds the reaction control(s) for item (e.g. a like/reaction stack).
CkCommentReplyActionBuilder<T> = Widget Function(T item, int depth, VoidCallback expandReplies)
Builds the "reply" affordance for item. expandReplies is supplied by the sheet — call it from your widget's tap handler (in addition to any app-specific logic, like focusing a composer) to reveal item's replies.
CkComposerFooterBuilder = Widget Function(BuildContext context, TextEditingController controller)
Builds the composer's toolbar (e.g. a type dropdown, media pickers, an AI writer button) — everything except the send button, which the sheet places according to CkSendButtonPosition. controller is the sheet's own composer text controller, so app-specific widgets (like an AI writer) can read/write the same text.
CkIdExtractor<T> = String Function(T item)
Returns a stable, unique identifier for item. Used as the key for the internal expand/collapse state, so it must not depend on object identity (the same logical item may be represented by a new instance after a refetch).
CkMultiImagePicker = CkMultiImagePickerFormField
CkRepliesExtractor<T> = List<T> Function(T item)
Returns the direct replies/children of item. Called recursively, so replies can themselves have replies — depth is not limited to 2 levels.
CorkitInitBuilder = Widget Function(BuildContext context, Widget? child)
DefaultTransformer = SyncTransformer
DioError = DioException
DioError describes the exception info when a request failed.
DioErrorType = DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioExceptionReadableStringBuilder = String Function(DioException e)
The readable string builder's signature of DioException.readableStringBuilder.
DioMediaType = MediaType
The type (alias) for specifying the content-type of the MultipartFile.
HeaderForEachCallback = void Function(String name, List<String> values)
The signature that iterates header fields.
InterceptorErrorCallback = void Function(DioException error, ErrorInterceptorHandler handler)
The signature of Interceptor.onError.
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
The signature of Interceptor.onRequest.
InterceptorSuccessCallback = void Function(Response response, ResponseInterceptorHandler handler)
The signature of Interceptor.onResponse.
JsonDecodeCallback = FutureOr Function(String)
The callback definition for decoding a JSON string.
JsonEncodeCallback = FutureOr<String> Function(Object)
The callback definition for encoding a JSON object.
OnRequestStateChange<T> = void Function(CkResponse<T> state)
ProgressCallback = void Function(int count, int total)
The type of a progress listening callback when sending or receiving data.
RequestEncoder = FutureOr<List<int>> Function(String request, RequestOptions options)
The type of a request encoding callback.
ResponseDecoder = FutureOr<String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
The type of a response decoding callback.
SvgErrorWidgetBuilder = Widget Function(BuildContext context, Object error, StackTrace stackTrace)
Builder function to create an error widget. This builder is called when the image failed loading.
SvgImageWidgetBuilder = Widget Function(BuildContext context, Widget child)
Builder function to wrap the successfully loaded SVG widget.
ValidateStatus = bool Function(int? status)
The type of a response status code validate callback.

Exceptions / Errors

DioException
DioException describes the exception info when a request failed.
NotNullableError<T>
A TypeError thrown by _checkNotNullable.