opticore
library
Classes
AdvancedLine
A widget that renders a customizable line, which can be solid or dotted, in either horizontal or vertical orientation.
AnsiPen
Pen attributes for foreground and background colors.
ApiResponse <M >
A class that encapsulates the response from an API call.
ApiResponseConfig
A class to configure the messages displayed for different API response scenarios.
AppBarConfig
A configuration class for customizing the AppBar widget.
AppConfig
AppConfig is a configuration class used to define global settings for the app.
It holds various properties related to theming, localization, routing, and performance settings.
This class is designed to be passed into the CoreSetup widget to configure the application
at a high level. It allows developers to customize various aspects of the app's appearance,
behavior, and debugging settings.
ArabicToEnglishNumberFormatter
A custom text input formatter that converts Arabic numerals to English numerals.
AssetLottie
AsyncBloc <T >
A generic BLoC for managing asynchronous operations in a structured manner.
AsyncData <T >
Represents a successful result from an async operation.
AsyncError <T >
Represents an error state when an async operation fails.
AsyncHelper
A singleton helper class to manage async operations sequentially and handle animation cancellations.
AsyncInitial <T >
Represents the initial state before any async operation starts.
AsyncLoading <T >
Represents a loading state when an async operation is in progress.
AsyncReactiveNotifier <T >
A reactive notifier for handling asynchronous operations with built-in
loading, error, and data states.
AsyncValue <T >
A wrapper class representing the state of an asynchronous operation.
AutoScrollTagState <W extends IndexScroller >
AutoScrollWhenFocused
A widget that ensures a child widget becomes visible when it gains focus,
such as when a TextFormField becomes focused and the keyboard appears.
BackButtonBehavior
此枚举会决定Toast对于物理返回键的处理方式
BackgroundTransformer
The default Transformer for Dio .
BarBottomSheet
BaseBloc
BaseBloc serves as the foundational class for managing state transitions
in a reactive application architecture using the BLoC pattern.
BaseEvent
Represents the base class for all events within the BLoC architecture.
BaseFactory
Abstract class for a state factory that determines and provides a state
based on the input data.
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 .
BaseRepo
A base class for all repository classes that handles network operations.
It provides functionality for managing network headers and performing
cleanup during disposal.
BaseScreen <M extends BaseBloc , T extends StatefulWidget , F >
A base class for scenes that manage state and provide common functionalities
for a screen in a Flutter application.
BaseState
Represents the base class for all states within the system.
Bloc <Event , State >
Takes a Stream of Events as input
and transforms them into a Stream of States as output.
BlocBase <State >
An interface for the core functionality implemented by
both Bloc and Cubit .
BlocBuilder <B extends StateStreamable <S > , S >
BlocBuilder handles building a widget in response to new states.
BlocBuilder is analogous to StreamBuilder but has simplified API to
reduce the amount of boilerplate code needed as well as bloc -specific
performance improvements.
Please refer to BlocListener if you want to "do" anything in response to
state changes such as navigation, showing a dialog, etc...
BlocBuilderBase <B extends StateStreamable <S > , S >
Base class for widgets that build themselves based on interaction with
a specified bloc .
BlocConsumer <B extends StateStreamable <S > , S >
BlocConsumer exposes a builder and listener in order react to new
states.
BlocConsumer is analogous to a nested BlocListener
and BlocBuilder but reduces the amount of boilerplate needed.
BlocConsumer should only be used when it is necessary to both rebuild UI
and execute other reactions to state changes in the bloc .
BlocEventSink <Event extends Object ? >
An ErrorSink that supports adding events.
BlocListener <B extends StateStreamable <S > , S >
Takes a BlocWidgetListener and an optional bloc and invokes
the listener in response to state changes in the bloc .
It should be used for functionality that needs to occur only in response to
a state change such as navigation, showing a SnackBar, showing
a Dialog, etc...
The listener is guaranteed to only be called once for each state change
unlike the builder in BlocBuilder.
BlocListenerBase <B extends StateStreamable <S > , S >
Base class for widgets that listen to state changes in a specified bloc .
BlocObserver
An interface for observing the behavior of Bloc instances.
BlocProvider <T extends StateStreamableSource <Object ? > >
Takes a create function that is responsible for
creating the Bloc or Cubit and a child which will have access
to the instance via BlocProvider.of(context).
It is used as a dependency injection (DI) widget so that a single instance
of a Bloc or Cubit can be provided to multiple widgets within a subtree.
BlocSelector <B extends StateStreamable <S > , S , T >
BlocSelector is analogous to BlocBuilder but allows developers to
filter updates by selecting a new value based on the bloc state.
Unnecessary builds are prevented if the selected value does not change.
BotToast
When generating widgets using the ToastBuilder method, please ensure that the generated widget's background does not absorb click events.
For example, Scaffold and Material widgets will by default occupy the entire parent space and absorb events (even if they are transparent). You can refer to the material.dart -> _RenderInkFeatures class -> hitTestSelf method for specific examples.
If you must generate such widgets, consider using IgnorePointer .
Failure to follow this rule may result in the malfunction of certain features, such as the allowClick feature.
BotToastNavigatorObserver
If your project has multiple Navigator instances, please add the BotToastNavigatorObserver to the Navigator.observers .
BotToastNavigatorObserverProxy
BytesLoader
An interface that can be implemented to support decoding vector graphic
binary assets from different byte sources.
Cache
The cache for decoded SVGs.
CachedNetworkImage
Image widget to show NetworkImage with caching functionality.
CachedNetworkImageProvider
IO implementation of the CachedNetworkImageProvider; the ImageProvider to
load network images using a cache.
CancelToken
Controls cancellation of Dio 's requests.
CapitalizeFirstWordFormatter
A custom text input formatter that capitalizes the first word of a text input.
Change <State >
A Change represents the change from one State to another.
A Change consists of the currentState and nextState .
ClipboardHelper
A utility class for managing clipboard operations in Flutter.
Closable
An object that must be closed when no longer in use.
ColoredLoggerFormatter
This formatter makes messages colorful
if this setting is enabled in the settings TalkerLoggerSettings
ColorMapper
A class that transforms from one color to another during SVG parsing.
ComponentDataState <F >
State representing a partial data load with generic data.
ComponentState
A state type that allows partial UI updates without triggering full screen rebuilds.
Connectivity
Discover network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more.
ConnectivityPlusLinuxPlugin
The Linux implementation of ConnectivityPlatform.
ConsoleUtils
Class that contains methods for working with console output
CoreAppBar
A customizable app bar widget for the application.
CoreButton
A customizable button widget for Flutter that can be used throughout the application.
CoreSetup
CoreSetup is a widget responsible for initializing and configuring essential global settings for the application.
It manages core aspects such as the theme, localization, routing, and screens for handling errors like Maintenance,
No Internet, and Not Found pages. This widget is typically used as the root widget to ensure the application is set up
with the correct configurations and runs smoothly with the desired settings.
CoreSheet
A utility class for displaying a customizable Cupertino modal bottom sheet.
Cubit <State >
A Cubit is similar to Bloc but has no notion of events
and relies on methods to emit new states.
CupertinoModalBottomSheetRoute <T >
CupertinoScaffold
CupertinoScaffoldInheirted
DataState <M >
Represents a state containing data of type M, typically used when the
application successfully loads or processes data.
DefaultFactory
A concrete implementation of BaseFactory that provides a default state
when no specific state can be determined.
DefaultState
Represents the default fallback state used when no specific state can
be determined.
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets
which don't have explicit theme values.
DefaultTalkerHistory
Base implementation of TalkerHistory
to save the history locally
Dio
Dio enables you to make HTTP requests easily.
DioLogger
A pretty logger for Dio
it will print request/response info with a pretty format
and also can filter the request/response by RequestOptions
DioMixin
DottedLine
A dotted line type, extending Line . It represents a line made up of dots with a customizable gap size between them.
DoubleBackExit
A widget that provides the functionality to close the app by double-tapping the back button.
DownloadProgress
Progress of the file that is being downloaded from the originalUrl.
DropShadow
EgyptPhoneNumberInputFormatter
A custom text input formatter that formats phone numbers for Egypt.
Emittable <State extends Object ? >
An object that can emit new states.
EmittableStateStreamableSource <State >
A StateStreamableSource that can emit new states.
Emitter <State >
An Emitter is a class which is capable of emitting new states.
EndLoadingStateNonRender
State representing the end of a loading process.
Equatable
A base class to facilitate operator == and hashCode overrides.
EquatableConfig
The default configuration for all Equatable instances.
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
ErrorSink
A generic destination for errors.
ErrorState
Represents an error state, which contains an error message and an optional
warning flag indicating the severity of the error.
ErrorStateNonRender
State representing an error or warning scenario.
ErrorStateRender
State representing an error or warning in the rendering process.
ErrorType
Defines the types of errors that can occur within the application.
ExpandableText
A widget for displaying text with an optional "Read more/Read less" button.
ExtendedLoggerFormatter
This formatter makes messages colorful
if this setting is enabled in the settings TalkerLoggerSettings
FaIcon
Creates an Icon Widget that works for non-material Icons, such as the
Font Awesome Icons.
FileLottie
FilterArgs
Filter arguments
FlexibleCheckBox
FlexibleGridView
A GridView that dynamically adjusts to the height of its children.
FlexibleListView <T >
A widget that displays a list of items with dynamic heights in a scrollable view.
FontAwesomeIcons
Icons based on font awesome 7.1.0
ForceLTRInputFormatter
A custom text input formatter that forces the text direction to be left-to-right (LTR).
FormData
A class to create readable "multipart/form-data" streams.
It can be used to submit forms and file uploads to http server.
FrameRate
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
GlobalBlocListener
A custom BlocObserver implementation to globally observe and log
lifecycle events of Blocs and Cubits in the application.
GradientOutlinedButton
A customizable button with a gradient outline. This button allows you to define a
gradient color for the outline, specify the corner radius, and set the stroke width of the outline.
It also accepts a child widget that will be displayed inside the button, and a callback function
that will be triggered when the button is pressed.
The headers class for requests and responses.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient .
IconDataBrands
IconData for a font awesome brand icon from a code point
IconDataDuotone
IconData for a font awesome duotone icon from a code point. Only works if
duotone icons (font awesome pro) have been installed.
IconDataLight
IconData for a font awesome light icon from a code point. Only works if
light icons (font awesome pro) have been installed.
IconDataRegular
IconData for a font awesome regular icon from a code point
IconDataSharpLight
IconData for a font awesome sharp light icon from a code point. Only works if
thin icons (font awesome pro, v6+) have been installed.
IconDataSharpRegular
IconData for a font awesome sharp regular icon from a code point. Only works if
thin icons (font awesome pro, v6+) have been installed.
IconDataSharpSolid
IconData for a font awesome sharp solid icon from a code point. Only works if
thin icons (font awesome pro, v6+) have been installed.
IconDataSharpThin
IconData for a font awesome sharp thin icon from a code point. Only works if
thin icons (font awesome pro, v6+) have been installed.
IconDataSolid
IconData for a font awesome solid icon from a code point
IconDataThin
IconData for a font awesome thin icon from a code point. Only works if
thin icons (font awesome pro, v6+) have been installed.
IndexScroller
A widget that provides the ability to scroll to a specific index in a list.
This widget is used with a ListView .
IndexScrollerController
A controller that provides the ability to scroll to a specific index in a list.
InitialState
State representing the initial or uninitialized state of the UI.
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 Interceptor s.
InterceptorsWrapper
A helper class to create interceptors in ease.
InternetCheckOption
Options for checking the internet connectivity to an address.
InternetCheckResult
Represents the result of an internet connection check.
InternetConnection
A utility class for checking internet connectivity status.
InternetConnectionHandler
A utility class for managing and checking internet connectivity status.
LazyIndexedStack
A widget that displays a stack of pages, with lazy loading, fade transitions, and preloading support.
LifecycleEventHelper
A helper class for handling lifecycle events.
Line
An abstract class representing a line, which can be used for custom drawing in the AdvancedLine widget.
LinePainter
A CustomPainter class that draws a line (solid or dotted) on a canvas.
ListParam <T >
Indicates a param being used as queries or form data,
and how does it gets formatted.
LoadAnimationState
State representing an animation being loaded or played.
LoadingStateNonRender
State representing an ongoing loading process.
LoadingStateRender
State representing an ongoing loading process in the UI.
LogDetails
A class for transporting data
about an log message
Logger
The functions that you can use:-
LoggerFilter
Abstract filter for messages logging.
LoggerFormatter
Responsible for formatting message before output
LoggerRouterObserver
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.
LogLevelFilter
This filter checks that current message level
is above certain LogLevel setting in TalkerLoggerSettings
Lottie
A widget to display a loaded LottieComposition .
The controller property allows to specify a custom AnimationController that
will drive the animation. If controller is null, the animation will play
automatically and the behavior could be adjusted with the properties animate ,
repeat and reverse .
LottieBuilder
A widget that displays a Lottie animation.
LottieCache
LottieComposition
LottieDelegates
LottieDrawable
LottieFontStyle
LottieImageAsset
LottieOptions
LottieProvider
MaintenanceConfig
MaintenanceConfig is a configuration class responsible for managing global settings
related to the maintenance mode of the application. This class allows customization of the
messages, button labels, toast notifications, and animations shown to the user when the app is
undergoing maintenance. It provides flexibility by supporting both default and custom values.
MaintenanceScreen
A screen widget used to display a "Maintenance Mode" page when the system is under maintenance.
Marker
MemoryLottie
ModalBottomSheet
A custom bottom sheet.
ModalBottomSheetState
ModalScrollController
Associates a ScrollController with a subtree.
ModalSheetRoute <T >
MultiBlocListener
Merges multiple BlocListener widgets into one widget tree.
MultiBlocObserver
A BlocObserver which supports registering multiple BlocObserver
instances. This is useful when maintaining multiple BlocObserver instances
for different functions e.g. LoggingBlocObserver,
ErrorReportingBlocObserver.
MultiBlocProvider
Merges multiple BlocProvider widgets into one widget tree.
MultiImageStreamCompleter
An ImageStreamCompleter with support for loading multiple images.
MultipartFile
An upload content that is a part of MultipartRequest.
This doesn't need to correspond to a physical file.
MultiRepositoryProvider
Merges multiple RepositoryProvider widgets into one widget tree.
NetworkConfig
NetworkConfig is a configuration class designed to manage network-related
settings, specifically focusing on HTTP headers. It provides methods for
updating, resetting, and accessing global headers used across network requests
throughout the application, ensuring consistent and dynamic management of headers.
NetworkHelper
A helper class to manage network requests using Dio.
NetworkLottie
NoInternetConfig
NoInternetConfig is a configuration class designed specifically to manage
settings related to displaying the "No Internet" screen in an application.
This class provides customizable options for the message, button text,
and animation used when the user is offline. It also allows you to reset
the configuration to its default values and access the current settings
globally throughout the app.
NoInternetScreen
A screen widget that displays a "No Internet" page when there is no internet connection.
NonRenderState
Base class for states that do not trigger UI rendering.
NotFoundConfig
NotFoundConfig is a configuration class that manages settings for
the "Page Not Found" screen in the application. It provides a way to
customize the animation displayed when a user navigates to a non-existent
page, ensuring that the user experience is consistent and adaptable.
NotFoundScreen
A screen widget that displays a "Not Found" page.
NullNonRenderState
State representing a null or empty state.
Options
The configuration for a single request.
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
PageAutoScrollController
A controller that provides the ability to scroll to a specific index in a list.
This controller is used with a PageView .
PictureInfo
The deocded result of a vector graphics asset.
PictureProvider
Deprecated class, will be removed, does not do anything.
PreferDirection
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
RawLottie
A widget that displays a LottieDrawable directly.
Reactive <T >
A widget that rebuilds when a ReactiveNotifier changes.
ReactiveNotifier <T >
A reactive value holder that notifies listeners when its value changes.
ReactiveProvider <T extends ChangeNotifier >
A widget that provides a ReactiveNotifier or ChangeNotifier to its descendants.
ReadMoreButton
A widget that represents a "Read more/Read less" button.
RedirectRecord
A record that records the redirection happens during requests,
including status code, request method, and the location.
RefreshView
A custom widget that wraps a child widget with a RefreshIndicator to provide pull-to-refresh functionality.
RenderCache
RenderDataState <F >
State representing a successful data load with generic data.
RenderState
Base class for states that trigger UI rendering.
RepositoryProvider <T >
Takes a create function that is responsible for creating the repository
and a child which will have access to the repository via
RepositoryProvider.of(context).
It is used as a dependency injection (DI) widget so that a single instance
of a repository can be provided to multiple widgets within a subtree.
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.
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.
RestartWidget
A widget that allows you to restart a part of the widget tree by resetting its key.
RestartWidgetState
RouteHelper
A service that encapsulates navigation logic, making it easier to manage routing
within the application. This class provides methods to push, replace, and pop routes
on the navigation stack, as well as to remove routes based on certain conditions.
SafeCall
A utility class that provides a safe way to execute asynchronous operations
without throwing exceptions.
ScaffoldConfig
A configuration class for the Scaffold widget in Flutter.
ScrollBehaviorHelper
A custom scroll behavior helper that defines platform-specific scroll physics and drag strategies.
ScrollStatusBarOverlay
Wraps a scrollable, and paints an overlay behind the status bar
whose opacity goes from 0 → 1 as you scroll down up to maxScrollOffset .
SimpleAutoScrollController
A controller that provides the ability to scroll to a specific index in a list.
This controller is used with a ListView .
SliverFlexibleGridView
A sliver version of FlexibleGridView for use with CustomScrollView .
SnapScrollSize
A custom ScrollPhysics implementation for snapping to a fixed size
interval during scrolling.
SolidLine
A solid line type, extending Line . It represents a simple continuous line.
StateBuilder <B extends BaseBloc , S extends ComponentState >
A widget that selectively rebuilds only when a specific ComponentState is emitted.
StateStreamable <State >
A Streamable that provides synchronous access to the current state .
StateStreamableSource <State >
A StateStreamable that must be closed when no longer in use.
Streamable <State extends Object ? >
An object that provides access to a stream of states over time.
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.
SvgWidget
A smart widget for rendering SVG images from various sources.
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 .
Talker
Talker - advanced exception handling and logging
for dart/flutter applications
TalkerData
Base Talker Data transfer object
Objects of this type are passed through
handlers observer and stream
TalkerDateTimeFormatter
Utility class for DateTime formatting.
TalkerDioLogger
Dio http client logger on Talker base
TalkerDioLoggerSettings
TalkerDioLogger settings and customization
TalkerError
Base implementation of TalkerData
to handle ONLY Error s
TalkerErrorHandler
TalkerException
Base implementation of TalkerData
to handle ONLY Exceptionss
TalkerFilter
TalkerHistory
Base class for create your own implementation of history
TalkerKey
TalkerKey - String key of log type (After 5.0.0)
TalkerLogType (Before 5.0.0)
TalkerLog
Base implementation of TalkerData
to create Logs
TalkerLogger
TalkerLoggerSettings
Logger customization settings
TalkerObserver
Base observer class for
to create your own observers
TalkerSettings
This class used for setup Talker configuration
TextInputHelper
A utility class to help manage text input formatting.
TickerProviderImpl
ToastHelper
A helper class for displaying custom toast messages using BotToast.
ToolsHelper
A helper class containing utility functions to manage common tasks
and ensure efficient execution of actions based on conditions, such as
controlling the frequency of repeated actions and ensuring internet
connectivity before executing a function.
TopScroller
A widget that listens for and handles the scrolls-to-top event.
TopScrollerEvent
Represents a scroll-to-top event.
Transformer
Transformer allows changes to the request/response data before
it is sent/received to/from the server.
Transition <Event , State >
A Transition is the change from one state to another.
Consists of the currentState , an event , and the nextState .
TruncatedText
A widget that displays a string of text with a limited number of lines.
If the text exceeds the given number of lines, it will be truncated using TextOverflow.ellipsis .
If the text is a break-line, i.e. '\n', and the last character of the text, it will be replaced with an ellipsis.
UnAuthenticatedConfig
Configuration class for handling unauthenticated state.
ValueDelegate <T >
VectorGraphicUtilities
Utility functionality for interaction with vector graphic assets.
Enums
ApiResponseType
Enum for different types of API responses.
AutoScrollPosition
CacheManagerLogLevel
Log levels of the cache manager. Debug shows failed downloads and verbose
also shows successful downloads and cache retrievals.
ConnectivityResult
Connection status check result.
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 .
HTTPMethod
An enumeration representing the standard HTTP methods.
InternetStatus
Enum representing the status of internet connectivity.
ListFormat
Specifies the array format (a single parameter with multiple parameter
or multiple parameters with the same name).
and the separator for array items.
LogLevel
Level of logs to segmentation and control logging output
RequestBodyType
Enum for request body type
ResponseType
Indicates which transformation should be applied to the response data.
ScrollDirection
Enum to define the scroll direction for FlexibleListView .
SvgType
Enum for representing different types of SVG sources.
TimeFormat
Enum representing different time formats.
ToastType
Enum representing different types of toast messages.
Functions
BotToastInit ()
→ TransitionBuilder
buildHighlightTransition ({required BuildContext context , required Animation <double > highlight , required Widget child , Color ? background , Color ? highlightColor })
→ Widget
debounce <E > (Duration duration )
→ EventTransformer <E >
A debounce transformer that delays event processing
defaultDioExceptionReadableStringBuilder (DioException e )
→ String
The default implementation of building a readable string of DioException .
defaultPointerDeviceKind (BuildContext context )
→ PointerDeviceKind
defaultViewportBoundaryGetter ()
→ Rect
The default viewport boundary getter.
fastDebounce <E > ()
→ EventTransformer <E >
Predefined debounce transformers for common use cases
Fast debounce - for immediate user interactions (200ms)
overlayStyleFromColor (Color color )
→ SystemUiOverlayStyle
resetBackground ()
→ String
resetForeground ()
→ String
sequential <E > ()
→ EventTransformer <E >
A sequential transformer for processing events one by one
showBarModalBottomSheet <T > ({required BuildContext context , required WidgetBuilder builder , Color ? backgroundColor , double ? elevation , ShapeBorder ? shape , Clip ? clipBehavior , Color barrierColor = Colors.black87 , bool bounce = true , bool expand = false , AnimationController ? secondAnimation , Curve ? animationCurve , bool useRootNavigator = false , bool isDismissible = true , bool enableDrag = true , Widget ? topControl , Duration ? duration , RouteSettings ? settings , SystemUiOverlayStyle ? overlayStyle , double ? closeProgressThreshold })
→ Future <T? >
showCupertinoModalBottomSheet <T > ({required BuildContext context , required WidgetBuilder builder , Color ? backgroundColor , double ? elevation , ShapeBorder ? shape , Clip ? clipBehavior , Color ? barrierColor , bool expand = false , AnimationController ? secondAnimation , Curve ? animationCurve , Curve ? previousRouteAnimationCurve , bool useRootNavigator = false , bool bounce = true , bool ? isDismissible , bool enableDrag = true , Radius topRadius = _kDefaultTopRadius , Duration ? duration , RouteSettings ? settings , Color ? transitionBackgroundColor , BoxShadow ? shadow , SystemUiOverlayStyle ? overlayStyle , double ? closeProgressThreshold })
→ Future <T? >
showCustomModalBottomSheet <T > ({required BuildContext context , required WidgetBuilder builder , required WidgetWithChildBuilder containerWidget , Color ? backgroundColor , double ? elevation , ShapeBorder ? shape , Clip ? clipBehavior , Color ? barrierColor , bool bounce = false , bool expand = false , AnimationController ? secondAnimation , Curve ? animationCurve , bool useRootNavigator = false , bool isDismissible = true , bool enableDrag = true , Duration ? duration , RouteSettings ? settings , double ? closeProgressThreshold })
→ Future <T? >
Shows a modal material design bottom sheet.
showMaterialModalBottomSheet <T > ({required BuildContext context , required WidgetBuilder builder , Color ? backgroundColor , double ? elevation , ShapeBorder ? shape , Clip ? clipBehavior , Color ? barrierColor , bool bounce = false , bool expand = false , AnimationController ? secondAnimation , Curve ? animationCurve , bool useRootNavigator = false , bool isDismissible = true , bool enableDrag = true , Duration ? duration , RouteSettings ? settings , double ? closeProgressThreshold })
→ Future <T? >
Shows a modal material design bottom sheet.
slowDebounce <E > ()
→ EventTransformer <E >
Slow debounce - for heavy operations (800ms)
standardDebounce <E > ()
→ EventTransformer <E >
Standard debounce - for search inputs (400ms)
verySlowDebounce <E > ()
→ EventTransformer <E >
Very slow debounce - for API-intensive operations (1500ms)
Typedefs
AxisValueGetter
= double Function(Rect rect )
A function that returns the value of an axis.
BlocBuilderCondition <S >
= bool Function(S previous , S current )
Signature for the buildWhen function which takes the previous state and
the current state and is responsible for returning a bool which
determines whether to rebuild BlocBuilder with the current state.
BlocCreator <M extends BaseBloc >
= M Function()
A typedef for creating instances of a BLoC (Business Logic Component).
BlocListenerCondition <S >
= bool Function(S previous , S current )
Signature for the listenWhen function which takes the previous state
and the current state and is responsible for returning a bool which
determines whether or not to call BlocWidgetListener of BlocListener
with the current state.
BlocWidgetBuilder <S >
= Widget Function(BuildContext context , S state )
Signature for the builder function which takes the BuildContext and
state and is responsible for returning a widget which is to be rendered.
This is analogous to the builder function in StreamBuilder .
BlocWidgetListener <S >
= void Function(BuildContext context , S state )
Signature for the listener function which takes the BuildContext along
with the state and is responsible for executing in response to
state changes.
BlocWidgetSelector <S , T >
= T Function(S state )
Signature for the selector function which
is responsible for returning a selected value, T, based on state.
CancelFunc
= void Function()
Toast的关闭函数,调用将会提前关闭对应的Toast
ConnectivityCheckCallback
= Future <InternetCheckResult > Function(InternetCheckOption option )
A callback function for checking if a specific internet endpoint is
reachable.
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.
EventHandler <Event , State >
= FutureOr <void > Function(Event event , Emitter <State > emit )
An event handler is responsible for reacting to an incoming Event
and can emit zero or more states via the Emitter .
EventMapper <Event >
= Stream <Event > Function(Event event )
Signature for a function which converts an incoming event
into an outbound stream of events.
Used when defining custom EventTransformer s.
EventTransformer <Event >
= Stream <Event > Function(Stream <Event > events , EventMapper <Event > mapper )
Used to change how events are processed.
By default events are processed concurrently.
FutureFunc
= Future <void > Function()
The signature that iterates header fields.
A base repository class that provides core functionality for interacting
with network services. It manages network-related operations and offers
mechanisms to update global headers.
ImageWidgetBuilder
= Widget Function(BuildContext context , ImageProvider <Object > imageProvider )
Builder function to create an image widget. The function is called after
the ImageProvider completes the image loading.
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.
LoadingErrorWidgetBuilder
= Widget Function(BuildContext context , String url , Object error )
Builder function to create an error widget. This builder is called when
the image failed loading, for example due to a 404 NotFound exception.
LoggerOutput
= void Function(String message )
LottieDecoder
= Future <LottieComposition ? > Function(List <int > bytes )
A function that knows how to transform a list of bytes to a LottieComposition
LottieImageProviderFactory
= ImageProvider <Object > ? Function(LottieImageAsset )
NetworkManagerClientFactory
= NetworkManagerClient Function()
PlaceholderWidgetBuilder
= Widget Function(BuildContext context , String url )
Builder function to create a placeholder widget. The function is called
once while the ImageProvider is loading the image.
PopTestFunc
= bool Function()
ProgressCallback
= void Function(int count , int total )
The type of a progress listening callback when sending or receiving data.
ProgressIndicatorBuilder
= Widget Function(BuildContext context , String url , DownloadProgress progress )
Builder function to create a progress indicator widget. The function is
called every time a chuck of the image is downloaded from the web, but at
least once during image loading.
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.
ResponseStatusFn
= bool Function(Response response )
A Callback Function to decide whether the request succeeded or not.
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.
TagHighlightBuilder
= Widget Function(BuildContext context , Animation <double > highlight )
ToastBuilder
= Widget Function(CancelFunc cancelFunc )
TopScrollerCallback
= Future <void > Function(TopScrollerEvent event )
A callback type for handling the "scrolls-to-top" event.
ValidateStatus
= bool Function(int ? status )
The type of a response status code validate callback.
ViewportBoundaryGetter
= Rect Function()
A mixin that provides the ability to scroll to a specific index in a list.
WidgetWithChildBuilder
= Widget Function(BuildContext context , Animation <double > animation , Widget child )
WrapAnimation
= Widget Function(AnimationController controller , CancelFunc cancelFunc , Widget widget )
WrapWidget
= Widget Function(CancelFunc cancelFunc , Widget widget )