voxa_core
library
Classes
Adapter
Adapters provide a mechanism to drive an animation from an arbitrary source.
For example, synchronizing an animation with a scroll, controlling
an animation with a slider input, or progressing an animation based on
the time of day.
AlignEffect
An effect that animates the target between the specified begin and end
alignments (via Align ).
Defaults to begin=Align.topCenter, end=Align.center.
Allow
Allows the navigation to proceed.
Animate
The Flutter Animate library makes adding beautiful animated effects to your widgets
simple. It supports both a declarative and chained API. The latter is exposed
via the Widget.animate extension, which simply wraps the widget in Animate.
AnimateList <T extends Widget >
Applies animated effects to a list of widgets. It does this by wrapping each
widget in Animate , and then proxying calls to all instances. It can
also offset the timing of each widget's animation via interval.
AnsiPen
Pen attributes for foreground and background colors.
AnyNotifier <StateT , ValueT >
Notifiers
A base class for all "notifiers".
ApiClientFactory
ApiConfig
ApiResponse <T >
AsyncData <ValueT >
Core
Creates an AsyncValue with a data.
AsyncError <ValueT >
Core
Creates an AsyncValue in the error state.
AsyncLoading <ValueT >
Core
Creates an AsyncValue in loading state.
AsyncNotifier <StateT >
Notifiers
A Notifier implementation that is asynchronously initialized.
AsyncNotifierProvider <NotifierT extends AsyncNotifier <ValueT > , ValueT >
Providers
A provider which creates and listen to an AsyncNotifier .
AsyncResult <ValueT >
A variant of AsyncValue that excludes AsyncLoading .
AsyncValue <ValueT >
Core
A utility for safely manipulating asynchronous data.
BackgroundTransformer
The default Transformer for Dio .
BaseApiService
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 .
Blend
Functions for blending in HCT and CAM16.
Block
Blocks the navigation from proceeding.
BlurEffect
An effect that animates a blur on the target between the
specified begin and end blur radiuses (via ImageFiltered ).
Defaults to begin=0, end=4.
BoxShadowEffect
An effect that animates a BoxShadow between begin and end (via DecoratedBox ).
A value of null for either will be interpreted as a shadow that matches the other shadow but
with a zero offset and blurRadius.
You can also specify a borderRadius that defines rounded corners for the shadow.
Defaults to begin=null, end=BoxShadow(color: Color(0x80000000), blurRadius: 8.0, offset: Offset(0.0, 4.0))
CallbackEffect
An effect that calls a callback function at a particular point in the animation.
It includes a boolean value indicating if the animation is playing in reverse.
Cam16
CAM16, a color appearance model. Colors are not just defined by their hex
code, but rather, a hex code and viewing conditions.
CancelToken
Controls cancellation of Dio 's requests.
ChangeNotifierAdapter
Drives an Animate animation from a ChangeNotifier . The valueGetter
should provide a value in the range 0-1 when a change occurs.
ColoredLoggerFormatter
This formatter makes messages colorful
if this setting is enabled in the settings TalkerLoggerSettings
ColorEffect
An effect that animates a Color between begin and end , composited with
the target using blendMode (via ColorFiltered ). A color value of null
will be interpreted as a fully transparent version of the other color.
Defaults to begin=null, end=Color(0x800099FF).
ConsoleUtils
Class that contains methods for working with console output
Consumer
Core
Build a widget tree while listening to providers.
ConsumerState <WidgetT extends ConsumerStatefulWidget >
Core
The State for a ConsumerStatefulWidget .
ConsumerStatefulWidget
Core
A StatefulWidget that has a State capable of reading providers.
ConsumerWidget
Core
The equivalent of a StatelessWidget that can listen to providers.
CorePalette
An intermediate concept between the key color for a UI theme, and a full
color scheme. 5 tonal palettes are generated, all except one use the same
hue as the key color, and all vary in chroma.
CrossfadeEffect
An effect that crossfades the incoming child (including preceeding effects)
with a new widget (via Stack and FadeTransition ). It uses a builder so
that the effect can be reused, but note that the builder is only called once
when the effect initially builds.
CustomEffect
Provide an easy way to add custom animated effects via a builder method that
accepts a BuildContext , target child, and calculated animation value
between begin and end .
CustomParameterCodec
annotation to define a custom parameter decoder/encoder
this is useful when the is encoded/decoded in a non-standard way like base64Url
this must be used as an annotation on a field
CustomTransitionPage <T >
Page with custom transition functionality.
DefaultTalkerHistory
Base implementation of TalkerHistory
to save the history locally
Dio
Dio enables you to make HTTP requests easily.
DioMixin
DynamicColor
A color that adjusts itself based on UI state provided by DynamicScheme .
DynamicColorBuilder
A stateful builder widget that provides a light and dark ColorScheme .
DynamicColorBuilderState
DynamicColorPlugin
Plugin for obtaining dynamic colors defined by the Android OS.
DynamicScheme
Constructed by a set of values representing the current UI state (such as
whether or not its dark theme, what the theme style is, etc.), and
provides a set of TonalPalette s that can create colors that fit in
with the theme style. Used by DynamicColor to resolve into a color.
Effect <T >
An empty effect that all other effects extend.
It can be added to Animate , but has no visual effect.
EffectEntry
Because Effect classes are immutable and may be reused between multiple
Animate (or AnimateList ) instances, an EffectEntry is created to store
values that may be different between instances. For example, due to an
interval on AnimateList, or from inheriting timing parameters.
EffectList
Simple helper class to build a list of effects via the chained api.
Example:
ElevationEffect
An effect that animates a Material elevation shadow between begin and end (via PhysicalModel ).
You can also specify a shadow color and borderRadius to add rounded corners.
It defaults to begin=0, end=8.
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
ExtendedLoggerFormatter
This formatter makes messages colorful
if this setting is enabled in the settings TalkerLoggerSettings
FadeEffect
Animates the opacity of the target between the specified
begin and end values (via FadeTransition ).
It defaults to begin=0, end=1.
Failure
FlexAdaptive
The FlexAdaptive class is used to define on what platforms
FlexColorScheme generated ThemeData platform adaptive theming
responses are used.
FlexColor
Defines colors, names and color schemes used to make maps and a list of
predefined FlexSchemeData objects that can be used by FlexColorScheme.
FlexColorScheme
Make beautiful Flutter themes using pre-designed color schemes or custom
colors. Get the resulting ThemeData with the toTheme method.
FlexCorePalette
An intermediate concept between the key color for a UI theme, and a full
color scheme. Five tonal palettes are generated, plus a default
error palette if not provided.
FlexKeyColors
Immutable data class that configures if and how FlexColorScheme uses
key colors to populate the Material-3 ColorScheme it creates and uses
to generate its ThemeData object.
FlexSchemeColor
Immutable color data class for the main scheme colors used in a
FlexColorScheme based color scheme and theming engine.
FlexSchemeData
Immutable data class that holds name and description string scheme
descriptions, light and dark , FlexSchemeColor definitions.
FlexSchemeOnColors
Immutable data class used to create "on" colors for displaying text
and icons on surface, background, error colors and the primary,
secondary and tertiary colors.
FlexSchemeSurfaceColors
Immutable data class used to make the six different surface colors in a
FlexColorScheme .
FlexSubThemes
A class container with static sub-theme helper functions used by
component theming in FlexColorScheme .
FlexSubThemesData
Parameters used by FlexColorScheme to configure its used FlexSubThemes .
FlexThemeModeOptionButton
Stateless widget that draws a box with the 4 colors, primary,
primary variant secondary and secondary variant in the properties of
passed in flexSchemeColor .
FlexThemeModeSwitch
A 3-way Light, Dark and System theme-mode switch widget.
FlexTonalPalette
A convenience class for retrieving colors that are constant in hue and
chroma, but vary in tone.
FlexTones
Configuration data class that defines which tone to use from each
FlexTonalPalette when assigning used color to each ColorScheme color.
FlipEffect
An effect that animates a 2.5D card flip rotation effect (via Transform ).
The effect can be horizontal or vertical.
FollowPathEffect
An effect that moves the target following the specified path (via Transform ).
The path coordinates are relative to the target's nominal position.
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
FutureProvider <ValueT >
Providers
A provider that asynchronously creates a value.
GoRoute
Get started
Configuration
Redirection
Transition animations
Named routes
A route that is displayed visually above the matching parent route using the
Navigator .
GoRouteData
Type-safe routes
A class to represent a GoRoute in
Type-safe routing .
GoRouteInformationParser
Converts between incoming URLs and a RouteMatchList using RouteMatcher.
GoRouteInformationProvider
The RouteInformationProvider created by go_router.
GoRouter
Get started
Upgrading
Configuration
Navigation
Redirection
Web
Deep linking
Named routes
Error handling
State restoration
The route configuration for the app.
GoRouterDelegate
GoRouter implementation of RouterDelegate .
GoRouterState
The route state during routing.
Hct
HCT, hue, chroma, and tone. A color system that provides a perceptually
accurate color measurement system that can also accurately render what
colors will appear as in different lighting environments.
The headers class for requests and responses.
Hook <R >
Hook is similar to a StatelessWidget , but is not associated
to an Element .
HookBuilder
A HookWidget that delegates its build to a callback.
HookConsumer
A widget that can both use hooks and listen to providers.
HookConsumerWidget
A widget that can both use hooks and listen to providers.
HookState <R , T extends Hook <R > >
The logic and internal state for a HookWidget
HookWidget
A Widget that can use a Hook .
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient .
ImperativeRouteMatch
The route match that represent route pushed through GoRouter.push .
InheritedGoRouter
GoRouter implementation of InheritedWidget.
InteractiveMotion
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.
ListenEffect
An effect that calls a callback function with its current animation value
between begin and end .
ListParam <T >
Indicates a param being used as queries or form data,
and how does it gets formatted.
LogDetails
A class for transporting data
about an log message
LoggerFilter
Abstract filter for messages logging.
LoggerFormatter
Responsible for formatting message before output
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
MaterialDynamicColors
Tokens, or named colors, in the Material Design system.
MoveEffect
An effect that moves the target between the specified begin and end
offsets (via Transform.translate ).
Defaults to begin=Offset(0, -16), end=Offset.zero.
transformHitTests is simply passed on to Transform.translate .
MultipartFile
An upload content that is a part of MultipartRequest.
This doesn't need to correspond to a physical file.
Notifier <ValueT >
Notifiers
A class which exposes a state that can change over time.
NotifierProvider <NotifierT extends Notifier <ValueT > , ValueT >
Providers
A provider that exposes a synchronous Notifier .
NoTransitionPage <T >
Custom transition page with no transition.
ObjectRef <T >
A class that stores a single value.
OnEnterResult
The result of an onEnter callback.
Options
The configuration for a single request.
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
Provider <ValueT >
Providers
A provider that exposes a read-only value.
ProviderContainer
Core
An object that stores the state of the providers and allows overriding the
behavior of a specific provider.
ProviderObserver
Core
An object that listens to the changes of a ProviderContainer .
ProviderObserverContext
Core
Information about the ProviderObserver event.
ProviderReference
The response of ProviderContainer.allProviders .
ProviderScope
Core
A widget that stores the state of providers.
ProviderSubscription <OutT >
Core
Represents the subscription to a ProviderListenable.
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.
Ref
Core
An object used by providers to interact with other providers and the life-cycles
of the application.
RelativeGoRouteData
Type-safe routes
A class to represent a relative GoRoute in
Type-safe routing .
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.
RotateEffect
Effect that rotates the target between begin and end (via RotationTransition ).
Values are specified in "turns" (360° or 2𝝅 radians), so a begin=0.25, end=2.25 would start with the child
rotated a quarter turn clockwise (90 degrees), and rotate two full turns (ending at 810 degrees).
Defaults to begin=-1.0, end=0.
RouteBase
The base class for GoRoute and ShellRoute .
RouteBuilder
Builds the top-level Navigator for GoRouter.
RouteConfiguration
The route configuration for GoRouter configured by the app.
RouteData
Baseclass for supporting
Type-safe routing .
RouteInformationState <T >
The data class to be stored in RouteInformation.state to be used by
GoRouteInformationParser .
RouteMatch
An matched result by matching a GoRoute against a location.
RouteMatchBase
The base class for various route matches.
RouteMatchList
The list of RouteMatchBase objects.
RoutingConfig
Configuration
A set of parameters that defines routing in GoRouter.
RuntimeThemeManager
RuntimeThemeManagerProvider
SaturateEffect
An effect that animates the color saturation of the target. The begin and
end values indicate the saturation level, where 0 is fully desaturated
(ie. grayscale) and 1 is normal saturation. Values >1 will oversaturate.
Defaults to begin=0, end=1.
ScaleEffect
An effect that scales the target between the specified begin and end
offset values (via Transform.scale ).
Defaults to begin=Offset(0,0), end=Offset(1,1).
Scheme
This class is the same concept as Flutter's ColorScheme class.
ScrollAdapter
Drives an Animate animation from a ScrollController .
ShaderEffect
Effect that applies an animated fragment shader to a target. See
Writing and using fragment shaders
for information on how to include shaders in your app.
ShaderUpdateDetails
Passed to the ShaderEffect.update callback. Contains information necessary
for updating the shader:
ShakeEffect
Effect that shakes the target, using translation, rotation, or both (via Transform ).
SharedPrefsStorage
ShellRoute
Configuration
A route that displays a UI shell around the matching child route.
ShellRouteBase
Base class for classes that act as shells for sub-routes, such
as ShellRoute and StatefulShellRoute .
ShellRouteContext
Context object used when building the shell and Navigator for a shell route.
ShellRouteData
A class to represent a ShellRoute in
Type-safe routing .
ShellRouteMatch
An matched result by matching a ShellRoute against a location.
ShimmerEffect
An effect that animates gradient overlay effects (via ShaderMask ), such as the shimmer loading effect
popularized by facebook .
SlideEffect
An effect that moves the target based on a fraction of its size
per the specified begin and end offsets (via SlideTransition ).
Defaults to begin=Offset(0, -0.5), end=Offset.zero
(slide down from half its height).
StatefulHookConsumerWidget
A StatefulWidget that is both a ConsumerWidget and a HookWidget .
StatefulHookWidget
A StatefulWidget that can use a Hook .
StatefulNavigationShell
Widget for managing the state of a StatefulShellRoute .
StatefulNavigationShellState
State for StatefulNavigationShell.
StatefulShellBranch
Representation of a separate branch in a stateful navigation tree, used to
configure StatefulShellRoute .
StatefulShellBranchData
Base class for supporting
StatefulShellRoute
StatefulShellRoute
Configuration
A route that displays a UI shell with separate Navigator s for its
sub-routes.
StatefulShellRouteData
Base class for supporting
StatefulShellRoute
Store <StateT , ActionT >
A store of mutable state that allows mutations by dispatching actions.
StreamNotifier <ValueT >
Notifiers
A variant of AsyncNotifier which has build creating a Stream .
StreamNotifierProvider <NotifierT extends StreamNotifier <ValueT > , ValueT >
Providers
A provider which creates and listen to an StreamNotifier .
StreamProvider <ValueT >
Providers
Creates a stream and exposes its latest event.
SwapEffect
An effect that swaps out the incoming child for a new child at a particular
point in time. This includes all preceding effects. It uses a builder so
that the effect can be reused, but note that the builder is only called once
when the effect initially builds.
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.
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
TalkerJsonFormatter
Formatter for converting data to pretty JSON strings.
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
TalkerService
TalkerSettings
This class used for setup Talker configuration
ThemeColorConfig
ThemeLayoutConfig
ThemeMotionConfig
ThemePersistence
ThemeTypographyConfig
ThenEffect
A special convenience "effect" that makes it easier to sequence effects after
one another. It does this by establishing a new baseline time equal to the
previous effect's end time and its own optional delay .
All subsequent effect delays are relative to this new baseline.
TintEffect
An effect that applies an animated color tint to the target (via ColorFiltered ).
The begin and end values indicate the strength of the tint (0 - 0% tint, 1 - 100% tint).
Defaults to begin=0, end=1.
ToggleEffect
An effect that allows you to toggle the behavior of a builder function at a certain
point in time.
TonalPalette
A convenience class for retrieving colors that are constant in hue and
chroma, but vary in tone.
Transformer
Transformer allows changes to the request/response data before
it is sent/received to/from the server.
TypedGoRoute <T extends GoRouteData >
A superclass for each typed go route descendant
TypedQueryParameter <T >
Annotation to override the URI name for a route parameter.
TypedRelativeGoRoute <T extends RelativeGoRouteData >
A superclass for each typed relative go route descendant
TypedRoute <T extends RouteData >
A superclass for each typed route descendant
TypedShellRoute <T extends ShellRouteData >
A superclass for each typed shell route descendant
TypedStatefulShellBranch <T extends StatefulShellBranchData >
A superclass for each typed shell route descendant
TypedStatefulShellRoute <T extends StatefulShellRouteData >
A superclass for each typed shell route descendant
UncontrolledProviderScope
Core
Expose a ProviderContainer to the widget tree.
ValueAdapter
Drives an Animate animation directly from a value in the range 0-1
ValueNotifierAdapter
Drives an Animate animation from a ValueNotifier . The value from the
notifier should be in the range 0-1.
ViewingConditions
In traditional color spaces, a color can be identified solely by the
observer's measurement of the color. Color appearance models such as CAM16
also use information about the environment where the color was
observed, known as the viewing conditions.
VisibilityEffect
An effect that toggles the visibility of the target (via Visibility ).
Defaults to end=true.
VoxaAnimationConfig
VoxaAnimationEngine
VoxaAnimations
VoxaAnimationWrapper
VoxaBadge
VoxaBootstrap
VoxaButton
VoxaCard
VoxaChip
VoxaColors
VoxaColorUtils
VoxaDateUtils
VoxaDialog
VoxaEmptyState
VoxaErrorState
VoxaGestureDetector
VoxaJson
VoxaLoadingSkeleton
VoxaLogger
VoxaMotion
VoxaNumberUtils
VoxaPlatformUtils
VoxaPresets
VoxaProgressBar
VoxaRadius
VoxaResponsive
VoxaRouter
VoxaRouteTransitions
VoxaSearchBar
VoxaSpacing
VoxaStorage
VoxaStorageManager
VoxaStringUtils
VoxaTextField
VoxaThemeBuilder
VoxaThemeConfig
VoxaThemeController
VoxaThemeControllerProvider
VoxaThemeEngine
VoxaTokens
VoxaTypography
WidgetRef
Core
An object that allows widgets to interact with providers.
Functions
defaultDioExceptionReadableStringBuilder (DioException e )
→ String
The default implementation of building a readable string of DioException .
resetBackground ()
→ String
resetForeground ()
→ String
use <R > (Hook <R > hook )
→ R
Registers a Hook and returns its value.
useAnimation <T > (Animation <T > animation )
→ T
Subscribes to an Animation and returns its value.
useAnimationController ({Duration ? duration , Duration ? reverseDuration , String ? debugLabel , double initialValue = 0 , double lowerBound = 0 , double upperBound = 1 , TickerProvider ? vsync , AnimationBehavior animationBehavior = AnimationBehavior.normal , List <Object ? > ? keys })
→ AnimationController
Creates an AnimationController and automatically disposes it when necessary.
useAppLifecycleState ()
→ AppLifecycleState ?
Returns the current AppLifecycleState value and rebuilds the widget when it changes.
useAutomaticKeepAlive ({bool wantKeepAlive = true })
→ void
Mark a widget using this hook as needing to stay alive even when it's in a
lazy list that would otherwise remove it.
useCallback <T extends Function > (T callback , [List <Object ? > keys = const <Object>[] ])
→ T
Cache a function across rebuilds based on a list of keys.
useCarouselController ({int initialItem = 0 , List <Object ? > ? keys })
→ CarouselController
Creates a CarouselController that will be disposed automatically.
useContext ()
→ BuildContext
Obtains the BuildContext of the building HookWidget .
useCupertinoTabController ({int initialIndex = 0 , List <Object ? > ? keys })
→ CupertinoTabController
Creates a CupertinoTabController that will be disposed automatically.
useDebounced <T > (T toDebounce , Duration timeout )
→ T?
Returns a debounced version of the provided value toDebounce, triggering
widget updates accordingly after a specified timeout duration.
useDraggableScrollableController ({List <Object ? > ? keys })
→ DraggableScrollableController
Creates a DraggableScrollableController that will be disposed automatically.
useEffect (Dispose ? effect (), [List <Object ? > ? keys ])
→ void
Useful for side-effects and optionally canceling them.
useExpansibleController ({List <Object ? > ? keys })
→ ExpansibleController
Creates a ExpansibleController that will be disposed automatically.
useExpansionTileController ({List <Object ? > ? keys })
→ ExpansionTileController
Creates a ExpansionTileController that will be disposed automatically.
useFixedExtentScrollController ({int initialItem = 0 , ScrollControllerCallback ? onAttach , ScrollControllerCallback ? onDetach , List <Object ? > ? keys })
→ FixedExtentScrollController
Creates FixedExtentScrollController that will be disposed automatically.
useFocusNode ({String ? debugLabel , FocusOnKeyEventCallback ? onKeyEvent , bool skipTraversal = false , bool canRequestFocus = true , bool descendantsAreFocusable = true , bool descendantsAreTraversable = true })
→ FocusNode
Creates an automatically disposed FocusNode .
useFocusScopeNode ({String ? debugLabel , FocusOnKeyEventCallback ? onKeyEvent , bool skipTraversal = false , bool canRequestFocus = true })
→ FocusScopeNode
Creates an automatically disposed FocusScopeNode .
useFuture <T > (Future <T > ? future , {T? initialData , bool preserveState = true })
→ AsyncSnapshot <T >
Subscribes to a Future and returns its current state as an AsyncSnapshot .
useIsMounted ()
→ IsMounted
Returns an IsMounted object that you can use
to check if the State is mounted.
useListenable <T extends Listenable ? > (T listenable )
→ T
Subscribes to a Listenable and marks the widget as needing build
whenever the listener is called.
useListenableSelector <R > (Listenable ? listenable , R selector () )
→ R
Rebuild only when there is a change in the selector result.
useMemoized <T > (T valueBuilder (), [List <Object ? > keys = const <Object>[] ])
→ T
Caches the instance of a complex object.
useOnAppLifecycleStateChange (LifecycleCallback ? onStateChanged )
→ void
Listens to the AppLifecycleState .
useOnListenableChange (Listenable ? listenable , VoidCallback listener )
→ void
Adds a given listener to a Listenable and removes it when the hook is
disposed.
useOnPlatformBrightnessChange (BrightnessCallback onBrightnessChange )
→ void
Listens to the platform Brightness .
useOnStreamChange <T > (Stream <T > ? stream , {void onData (T event )?, void onError (Object error , StackTrace stackTrace )?, void onDone ()?, bool ? cancelOnError })
→ StreamSubscription <T > ?
Subscribes to a Stream and calls the Stream.listen to register the onData,
onError, and onDone.
useOverlayPortalController ({List <Object ? > ? keys })
→ OverlayPortalController
Creates a OverlayPortalController that will be disposed automatically.
usePageController ({int initialPage = 0 , bool keepPage = true , double viewportFraction = 1.0 , ScrollControllerCallback ? onAttach , ScrollControllerCallback ? onDetach , List <Object ? > ? keys })
→ PageController
Creates a PageController that will be disposed automatically.
usePlatformBrightness ()
→ Brightness
Returns the current platform Brightness value and rebuilds the widget when it changes.
usePrevious <T > (T val )
→ T?
Returns the previous value passed to usePrevious (from the previous widget build).
useReassemble (VoidCallback callback )
→ void
Runs the callback on every hot reload,
similar to reassemble in the stateful widgets.
useReducer <StateT , ActionT > (Reducer <StateT , ActionT > reducer , {required StateT initialState , required ActionT initialAction })
→ Store <StateT , ActionT >
An alternative to useState for more complex states.
useRef <T > (T initialValue )
→ ObjectRef <T >
Creates an object that contains a single mutable property.
useScrollController ({double initialScrollOffset = 0.0 , bool keepScrollOffset = true , String ? debugLabel , ScrollControllerCallback ? onAttach , ScrollControllerCallback ? onDetach , List <Object ? > ? keys })
→ ScrollController
Creates ScrollController that will be disposed automatically.
useSearchController ({List <Object ? > ? keys })
→ SearchController
Creates a SearchController that will be disposed automatically.
useSingleTickerProvider ({List <Object ? > ? keys })
→ TickerProvider
Creates a single usage TickerProvider .
useSnapshotController ({bool allowSnapshotting = false })
→ SnapshotController
Creates and disposes a SnapshotController .
useState <T > (T initialData )
→ ValueNotifier <T >
Creates a variable and subscribes to it.
useStream <T > (Stream <T > ? stream , {T? initialData , bool preserveState = true })
→ AsyncSnapshot <T >
Subscribes to a Stream and returns its current state as an AsyncSnapshot .
useStreamController <T > ({bool sync = false , VoidCallback ? onListen , VoidCallback ? onCancel , List <Object ? > ? keys })
→ StreamController <T >
Creates a StreamController which is automatically disposed when necessary.
useTabController ({required int initialLength , Duration ? animationDuration = kTabScrollDuration , TickerProvider ? vsync , int initialIndex = 0 , List <Object ? > ? keys })
→ TabController
Creates a TabController that will be disposed automatically.
useTransformationController ({Matrix4 ? initialValue , List <Object ? > ? keys })
→ TransformationController
Creates and disposes a TransformationController .
useTreeSliverController ()
→ TreeSliverController
Creates a TreeSliverController that will be disposed automatically.
useValueChanged <T , R > (T value , R? valueChange (T oldValue , R? oldResult ) )
→ R?
Watches a value and triggers a callback whenever the value changed.
useValueListenable <T > (ValueListenable <T > valueListenable )
→ T
Subscribes to a ValueListenable and returns its value.
useValueNotifier <T > (T initialData , [List <Object ? > ? keys ])
→ ValueNotifier <T >
Creates a ValueNotifier that is automatically disposed.
useWidgetStatesController ({Set <WidgetState > ? values , List <Object ? > ? keys })
→ WidgetStatesController
Creates a WidgetStatesController that will be disposed automatically.
Typedefs
AnimateCallback
= void Function(AnimationController controller )
Function signature for Animate callbacks.
BrightnessCallback
= FutureOr <void > Function(Brightness previous , Brightness current )
A callback triggered when the platform brightness changes.
CustomEffectBuilder
= Widget Function(BuildContext context , double value , 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.
Dispose
= void Function()
A function called when the state of a widget is destroyed.
ExitCallback
= FutureOr <bool > Function(BuildContext context , GoRouterState state )
Signature for function used in RouteBase.onExit.
GoExceptionHandler
= void Function(BuildContext context , GoRouterState state , GoRouter router )
The function signature of GoRouter.onException.
GoRouterBuilderWithNav
= Widget Function(BuildContext context , Widget child )
Signature of a go router builder function with navigator.
GoRouterPageBuilder
= Page Function(BuildContext context , GoRouterState state )
The page builder for GoRoute .
GoRouterRedirect
= FutureOr <String ? > Function(BuildContext context , GoRouterState state )
The signature of the redirect callback.
GoRouterWidgetBuilder
= Widget Function(BuildContext context , GoRouterState state )
The widget builder for GoRoute .
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 .
IsMounted
= bool Function()
Used by useIsMounted to allow widgets to determine if the Widget is still
in the widget tree or not.
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.
LifecycleCallback
= FutureOr <void > Function(AppLifecycleState ? previous , AppLifecycleState current )
A callback triggered when the app life cycle changes.
LoggerOutput
= void Function(String message )
NavigationCallback
= Future <RouteMatchList > Function()
The function signature for navigation callbacks in _OnEnterHandler.
NavigatorBuilder
= Widget Function(GlobalKey <NavigatorState > navigatorKey , ShellRouteMatch match , RouteMatchList matchList , List <NavigatorObserver > ? observers , String ? restorationScopeId )
Signature for functions used to build Navigators
OnEnter
= FutureOr <OnEnterResult > Function(BuildContext context , GoRouterState currentState , GoRouterState nextState , GoRouter goRouter )
The signature for the top-level onEnter callback.
OnEnterThenCallback
= FutureOr <void > Function()
Signature for callbacks invoked after an OnEnterResult is resolved.
ParserExceptionHandler
= RouteMatchList Function(BuildContext context , RouteMatchList routeMatchList )
The function signature of GoRouteInformationParser.onParserException .
PopPageWithRouteMatchCallback
= bool Function(Route route , dynamic result , RouteMatchBase match )
Signature for a function that takes in a route to be popped with
the result and returns a boolean decision on whether the pop
is successful.
ProgressCallback
= void Function(int count , int total )
The type of a progress listening callback when sending or receiving data.
QueryParameterDecoder <T >
= T Function(String value )
Signature for custom query parameter decoding functions.
QueryParameterEncoder <T >
= String Function(T value )
Signature of custom query parameter encoding.
Reducer <State , Action >
= State Function(State state , Action action )
Composes an Action and a State to create a new State.
ReparentChildBuilder
= Widget Function(Widget parent , Widget child )
The builder type used by Animate.reparentTypes . It must accept an existing
parent widget, and rebuild it with the provided child. In effect, it clones
the provided parent widget with the new child.
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.
RouteInfoState
= RouteInformationState
Type alias for route information state with dynamic type parameter.
RouteMatchVisitor
= bool Function(RouteMatchBase )
The function signature for RouteMatchList.visitRouteMatches
ShaderUpdateCallback
= EdgeInsets ? Function(ShaderUpdateDetails details )
Function signature for ShaderEffect update handlers.
ShellNavigationContainerBuilder
= Widget Function(BuildContext context , StatefulNavigationShell navigationShell , List <Widget > children )
Builder for a custom container for the branch Navigators of a
StatefulShellRoute .
ShellRouteBuilder
= Widget Function(BuildContext context , GoRouterState state , Widget child )
The widget builder for ShellRoute .
ShellRoutePageBuilder
= Page Function(BuildContext context , GoRouterState state , Widget child )
The page builder for ShellRoute .
StatefulShellRouteBuilder
= Widget Function(BuildContext context , GoRouterState state , StatefulNavigationShell navigationShell )
The widget builder for StatefulShellRoute .
StatefulShellRoutePageBuilder
= Page Function(BuildContext context , GoRouterState state , StatefulNavigationShell navigationShell )
The page builder for StatefulShellRoute .
ToggleEffectBuilder
= Widget Function(BuildContext context , bool value , Widget child )
ValidateStatus
= bool Function(int ? status )
The type of a response status code validate callback.