get_hooked library

Classes

Animator<T>
An object that drives animations.
AsyncData<T>
An AsyncValue representing an operation that has completed or yielded a relevant result.
AsyncError<T>
Signifies that an asynchronous operation has encountered an error.
AsyncLoading<T>
An AsyncValue representing a Future that has yet to complete or a Stream that has yet to yield any values.
AsyncNotifier<T>
A ValueNotifier that can process Future and Stream objects.
AsyncSnapshot<T>
Immutable representation of the most recent interaction with an asynchronous computation.
AsyncValue<T>
A data class that stores information about an asynchronous operation, which could be a Future or Stream.
BoxSize
Stores the configuration for a SizedBox without specifying a child.
ClippedDecoration
A variation of DecoratedBox that allows specifying a clipBehavior.
ClipRef
Interface used in the RefClipCallback.
Completer<T>
A way to produce Future objects and to complete them later with a value or error.
DefaultAnimationStyle
Designates an AnimationStyle for descendant widgets to fall back to.
EventSink<T>
A Sink that supports adding errors.
Future<T>
The result of an asynchronous computation.
FutureOr<T>
A type representing values that are either Future<T> or T.
GetScope
Allows Substitutions for ValueListenable objects.
ListenablePlaceholder<T>
Similarly to Get objects, ListenablePlaceholder is intended to be declared with a global scope and accessed via Ref.watch calls, but their value is seldom (or never) accessed directly: instead a Substitution is added to an ancestor GetScope to redirect it to another value.
MediaQueryNotifier<T>
This notifier's purpose is similar to obtaining information from the ancestor MediaQuery widget but allows interfacing with APIs that accept ValueListenable objects.
MultiStreamController<T>
An enhanced stream controller provided by Stream.multi.
OverlayNotifier
A subclass of OverlayPortalController that sends a notification when show and hide are called.
PaintRef
An interface used by RefPaint.paint and RefPaint.semanticsBuilder.
ProxyAnimator<T>
An Animation object created from an Animator.
ProxyNotifier<Result, Input>
Selects a value from an existing ValueListenable and notifies when that value changes.
Ref
An object (usually an Element) that can subscribe to notifications from ValueListenable objects.
RefAlign
A variant of Align that evaluates based on a RefComputer<AlignmentGeometry>.
RefAspectRatio
A variant of AspectRatio that evaluates based on a RefComputer<double>.
RefBuilder
A variation of a Builder whose callback can use ref to watch ValueListenable objects.
RefClip
Clips the child based on a RefClipCallback.
RefConstraints
A variant of ConstrainedBox that evaluates based on a RefComputer<BoxConstraints>.
RefContext
A fancy BuildContext that also implements the following interfaces:
RefDecoration
A variant of DecoratedBox that evaluates based on a RefComputer<Decoration>.
RefLayout
RefLayout is designed to display a finite number of children. To show a widget List of arbitrary length, consider using Wrap, GridView, CustomScrollView, or TableView from the two_dimensional_scrollables package.
RefLayoutDelegate
A handle for laying out and positioning a child of a RefLayout.
RefLayoutState<T extends RefLayout>
The logic and state for a RefLayout widget.
RefOpacity
A variant of Opacity that evaluates based on a RefComputer<double>.
RefPadding
A variant of Padding that evaluates based on a RefComputer<EdgeInsetsGeometry>.
RefPaint
A variation of CustomPaint that uses a PaintRef to interface with ValueListenable objects.
RefParentData<Data extends ParentData>
When using a ParentDataWidget, the widget contains fields that translate to ParentData properties, and its corresponding ParentDataElement updates the render object using the widget instance each time it rebuilds.
RefPointer
A variant of IgnorePointer or AbsorbPointer that evaluates based on a RefComputer<bool>.
RefPosition
A variant of Positioned where the layout is determined by a RefComputer callback.
RefShaderMask
A variant of ShaderMask that evaluates based on a RefShaderCallback.
RefSizedBox
A variant of SizedBox that evaluates based on a RefComputer<BoxSize>.
RefTransform
A variant of Transform that evaluates based on a RefComputer<Matrix4>.
RefWidget
A variation of a StatelessWidget whose build method can use ref to watch ValueListenable objects.
RenderClippedDecoration
Paints a Decoration.
RenderRefAlign
Positions its child using an Alignment.
ShaderRef
Interface used in the RefShaderCallback.
SingleChildComputeElement<Render extends RenderObject>
A convenience class for making a SingleChildRenderObjectWidget with a RefComputer.
StatefulRefWidget
A variation of a StatefulWidget whose State.build method can use ref to watch ValueListenable objects.
Stream<T>
A source of asynchronous data events.
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams.
StreamController<T>
A controller with the stream it controls.
StreamIterator<T>
An Iterator-like interface for the values of a Stream.
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously.
StreamSubscription<T>
A subscription on events from a Stream.
StreamTransformer<S, T>
Transforms a Stream.
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer.
StreamView<T>
Stream wrapper that only exposes the Stream interface.
StyledAnimation<T>
Interface for an Animation that uses a Vsync to manage its Ticker and AnimationStyle.
Substitution
An immutable description of how one ValueListenable object can be used in place of another.
SubstitutionModel
An InheritedModel used by ref to store its Substitutions and notify dependent widgets.
SynchronousStreamController<T>
A stream controller that delivers its events synchronously.
TickerFuture
An object representing an ongoing Ticker sequence.
TickerProvider
An interface implemented by classes that can vend Ticker objects.
Timer
A countdown timer that can be configured to fire once or repeatedly.
ValueAnimation<T>
A ValueListenable whose value updates each frame over the specified duration to create a continuous visual transition.
ValueListenable<T>
An interface for subclasses of Listenable that expose a value.
Vsync
A TickerProvider that also applies an AnimationStyle.
VsyncDouble
A variant of AnimationController that implements the VsyncValue and StyledAnimation interfaces. (An Animation object can be obtained via toAnimation.)
VsyncValue<T>
A ValueListenable attached to a TickerProvider.
Zone
A zone represents an environment that remains stable across asynchronous calls.
ZoneDelegate
An adapted view of the parent zone.
ZoneSpecification
A parameter object with custom zone function handlers for Zone.fork.

Enums

ConnectionState
The state of connection to an asynchronous computation.

Mixins

DisposeGuard
Mixin for Get objects with a dispose method.
ElementCompute
Allows any Element declaration to act as a RefContext.
ElementVsync
A mixin that implements the Vsync interface.
RefElement
A mixin on ComponentElement that implements the Ref interface for RefWidget, StatefulRefWidget, and RefBuilder.
StrictNotifier
Ensures that the notifier only sends updates between frames.

Extension Types

Get
Encapsulates a ValueListenable object with an interface for easy updates and automatic lifecycle management.
GetAnimationStatus
Encapsulates the Animator.status listenable.
GetAsync
Encapsulates an AsyncNotifier.
GetBrightness
An interface for obtaining the current platform Brightness.
GetComputed
Encapsulates a Listenable which notifies based on a RefComputer callback.
GetList
Encapsulates a ListNotifier and can be used as a List directly.
GetMap
Encapsulates a MapNotifier and can be used as a Map directly.
GetOverlay
Encapsulates an OverlayPortalController.
GetQuery
Encapsulates a MediaQueryNotifier.
GetSelection
Encapsulates a Listenable which notifies based on a RefComputer callback.
GetSet
Encapsulates a SetNotifier and can be used as a Set directly.
GetValue
Encapsulates a ValueNotifier.
GetViewData
A variation of the Get API that double-checks the FlutterView count when retrieving the value.
GetVsyncDouble
Encapsulates an AnimationController.
GetVsyncValue
Encapsulates a ValueAnimation.
LayoutRef
Provides layout utilities and context for RefLayout children during RefLayoutState.performLayout.
SubMap
A Map where each value is assumed to implement the same interface as the corresponding key.
VsyncRegistry
Since AnimationController does not expose its ticker provider field, this registry was created to track animations' Vsyncs.

Extensions

FutureExtensions on Future<T>
Convenience methods on futures.
FutureIterable on Iterable<Future<T>>
FutureRecord2 on (Future<T1>, Future<T2>)
Parallel operations on a record of futures.
FutureRecord3 on (Future<T1>, Future<T2>, Future<T3>)
Parallel operations on a record of futures.
FutureRecord4 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>)
Parallel operations on a record of futures.
FutureRecord5 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>)
Parallel operations on a record of futures.
FutureRecord6 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>)
Parallel operations on a record of futures.
FutureRecord7 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>)
Parallel operations on a record of futures.
FutureRecord8 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>)
Parallel operations on a record of futures.
FutureRecord9 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>, Future<T9>)
Parallel operations on a record of futures.
GetHooked on Get<Object?, V>
Gives access to methods such as ValueListenable.addListener.
GetScopeRead on BuildContext
Allows accessing the relevant value from an ancestor GetScope in a reasonably concise manner.
StateVsync on State<T>
An extension that provides a Vsync from the element's BuildContext.
ToggleValue on GetValue<bool>
Toggles a boolean GetValue.
VsyncRegistryExtension on Vsync
Gives access to the VsyncRegistry within an Vsync declaration.

Properties

ref Ref
Provides access to the current RefElement during a build.
no setter

Functions

runZoned<R>(R body(), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification, Function? onError}) → R
Runs body in its own zone.
runZonedGuarded<R>(R body(), void onError(Object error, StackTrace stack), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification}) → R?
Runs body in its own error zone.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously.
unawaited(Future<void>? future) → void
Explicitly ignores a future.

Typedefs

AsyncValueGetter<T> = Future<T> Function()
Signature for callbacks that are to asynchronously report a value on demand.
ControllerCallback = void Function()
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback = FutureOr<void> Function()
Type of stream controller onCancel callbacks.
CreatePeriodicTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer))
The type of a custom Zone.createPeriodicTimer implementation function.
CreateTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f())
The type of a custom Zone.createTimer implementation function.
ErrorCallbackHandler = AsyncError? Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace)
The type of a custom Zone.errorCallback implementation function.
ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification? specification, Map<Object?, Object?>? zoneValues)
The type of a custom Zone.fork implementation function.
HandleUncaughtErrorHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace)
The type of a custom Zone.handleUncaughtError implementation function.
LerpCallback<T> = T? Function(T a, T b, double t)
Function signature for linear interpolation.
PrintHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, String line)
The type of a custom Zone.print implementation function.
RefClipCallback<T> = T Function(ClipRef ref)
Signature for the callback passed to RefClip.
RefComputer<Result> = Result Function(Ref ref)
Signature for a callback that computes a result using a provided Ref.
RefPaintCallback = void Function(PaintRef ref)
Signature for the callback within a RefPaint widget that paints a UI element using a PaintRef.
RefPaintSemanticsBuilder = List<CustomPainterSemantics> Function(PaintRef ref)
Builds semantics information describing the picture drawn by a RefPaintCallback. Each CustomPainterSemantics in the returned list is converted into a SemanticsNode by copying its properties.
RefShaderCallback = Shader Function(ShaderRef ref)
Signature for the callback passed to RefShaderMask.
RegisterBinaryCallbackHandler = ZoneBinaryCallback<R, T1, T2> Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2))
The type of a custom Zone.registerBinaryCallback implementation function.
RegisterCallbackHandler = ZoneCallback<R> Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.registerCallback implementation function.
RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))
The type of a custom Zone.registerUnaryCallback implementation function.
RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2)
The type of a custom Zone.runBinary implementation function.
RunHandler = R Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.run implementation function.
RunUnaryHandler = R Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg)
The type of a custom Zone.runUnary implementation function.
ScheduleMicrotaskHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, void f())
The type of a custom Zone.scheduleMicrotask implementation function.
StreamCallback<T> = Stream<T> Function()
A Function that returns a Stream.
ViewFinder = FlutterView Function()
Signature for a ValueGetter that returns a FlutterView.
ZoneBinaryCallback<R, T1, T2> = R Function(T1, T2)
A two-argument function, like the argument to Zone.runBinary.
ZoneCallback<R> = R Function()
A no-argument function, like the argument to Zone.run.
ZoneUnaryCallback<R, T> = R Function(T)
A one-argument function, like the argument to Zone.runUnary.

Exceptions / Errors

DeferredLoadException
Thrown when a deferred library fails to load.
ParallelWaitError<V, E>
Error thrown when waiting for multiple futures, when some have errors.
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.