bdaya_flutter_common library

Classes

AbstractConnectableStream<T, S extends Subject<T>, R extends Stream<T>>
Base class for implementations of ConnectableStream. S is type of the forwarding Subject. R is return type of autoConnect and refCount (type constraint: S extends R).
AnsiPen
Pen attributes for foreground and background colors.
BdayaAppThemeServiceBase
BdayaCombinedController
For all controllers (Dialogs + Pages)
BdayaCombinedRouteController
For page controllers that require route information
BdayaFlutterCommonPackageModule
BdayaLoadableArea
BdayaLoadableAreaWrapper
BdayaLocalAppThemeService
Saves theme and locale locally via SharedPreference
BdayaLocalizedStr
BdayaMultiLoadableAreaWrapper
BdayaStreamToListenable
BehaviorSubject<T>
A special StreamController that captures the latest item that has been added to the controller, and emits that as the first item to any new listener.
BufferCountStreamTransformer<T>
Buffers a number of values from the source Stream by count then emits the buffer and clears it, and starts a new buffer each startBufferEvery values. If startBufferEvery is not provided, then new buffers are started immediately at the start of the source and when each buffer closes and is emitted.
BufferStreamTransformer<T>
Creates a Stream where each item is a List containing the items from the source sequence.
BufferTestStreamTransformer<T>
Creates a Stream where each item is a List containing the items from the source sequence, batched whenever test passes.
CombineLatestStream<T, R>
Merges the given Streams into one Stream sequence by using the combiner function whenever any of the source stream sequences emits an item.
CompositeSubscription
Acts as a container for multiple subscriptions that can be canceled at once e.g. view subscriptions in Flutter that need to be canceled on view disposal
ConcatEagerStream<T>
Concatenates all of the specified stream sequences, as long as the previous stream sequence terminated successfully.
ConcatStream<T>
Concatenates all of the specified stream sequences, as long as the previous stream sequence terminated successfully.
ConnectableStream<T>
A ConnectableStream resembles an ordinary Stream, except that it can be listened to multiple times and does not begin emitting items when it is listened to, but only when its connect method is called.
ConnectableStreamSubscription<T>
A special StreamSubscription that not only cancels the connection to the source Stream, but also closes down a subject that drives the Stream.
DebounceStreamTransformer<T>
Transforms a Stream so that will only emit items from the source sequence if a window has completed, without the source sequence emitting another item.
DefaultIfEmptyStreamTransformer<S>
Emit items from the source Stream, or a single default item if the source Stream emits nothing.
DeferStream<T>
The defer factory waits until a listener subscribes to it, and then it creates a Stream with the given factory function.
DelayStreamTransformer<S>
The Delay operator modifies its source Stream by pausing for a particular increment of time (that you specify) before emitting each of the source Stream’s items. This has the effect of shifting the entire sequence of items emitted by the Stream forward in time by that specified increment.
DelayWhenStreamTransformer<T>
Delays the emission of items from the source Stream by a given time span determined by the emissions of another Stream.
DematerializeStreamTransformer<S>
Converts the onData, onDone, and onError Notification objects from a materialized stream into normal onData, onDone, and onError events.
Disposable
If objects that are registered inside GetIt implements Disposable the onDispose method will be called whenever that Object is unregistered, resetted or its enclosing Scope is popped
DisposeMethod
marks an instance method as a dispose call back to be passed to GetIt
DistinctUniqueStreamTransformer<S>
Create a Stream which implements a HashSet under the hood, using the provided equals as equality.
DoStreamTransformer<S>
Invokes the given callback at the corresponding point the the stream lifecycle. For example, if you pass in an onDone callback, it will be invoked when the stream finishes emitting items.
EndWithManyStreamTransformer<S>
Appends a sequence of values to the source Stream.
EndWithStreamTransformer<S>
Appends a value to the source Stream before closing.
Environment
Used to annotate dependencies which are registered under certain environments
EnvironmentFilter
a simple filter function to be used inside SimpleEnvironmentFilter filter for whether to register for the given set of environments clients can extend this class to maker their own environmentFilters
ErrorAndStackTrace
An Object which acts as a tuple containing both an error and the corresponding stack trace.
ExhaustMapStreamTransformer<S, T>
Converts events from the source stream into a new Stream using a given mapper. It ignores all items from the source stream until the new stream completes.
ExternalModule
FactoryMethod
Marks a factory, a named constructor or a static create function as an injectable constructor if not added the default constructor will be used
FactoryParam
Marks a constructor param as factoryParam so it can be passed to the resolver function
FlatMapStreamTransformer<S, T>
Converts each emitted item into a new Stream using the given mapper function, while limiting the maximum number of concurrent subscriptions to these Streams. The newly created Stream will be listened to and begin emitting items downstream.
ForkJoinStream<T, R>
This operator is best used when you have a group of streams and only care about the final emitted value of each. One common use case for this is if you wish to issue multiple requests on page load (or some other event) and only want to take action when a response has been received for all.
FromCallableStream<T>
Returns a Stream that, when listening to it, calls a function you specify and then emits the value returned from that function.
GetIt
Very simple and easy to use service locator You register your object creation factory or an instance of an object with registerFactory, registerSingleton or registerLazySingleton And retrieve the desired object using get or call your locator as function as its a callable class Additionally GetIt offers asynchronous creation functions as well as functions to synchronize the async initialization of multiple Singletons
GetItHelper
a helper class to handle conditional registering
GroupByStreamTransformer<T, K>
The GroupBy operator divides a Stream that emits items into a Stream that emits GroupedStream, each one of which emits some subset of the items from the original source Stream.
GroupedStream<T, K>
The Stream used by GroupByStreamTransformer, it contains events that are grouped by a key value.
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.
HookState<R, T extends Hook<R>>
The logic and internal state for a HookWidget
HookWidget
A Widget that can use a Hook.
IgnoreElementsStreamTransformer<S>
Creates a Stream where all emitted items are ignored, only the error / completed notifications are passed
IgnoreParam
Constructor params annotated with IgnoreParam will be ignored by when generating the resolver function
InitDependency
Data structure used to identify a dependency by type and instanceName
Injectable
Marks a class as an injectable dependency and generates
InjectableInit
// Marks a top-level function as an initializer function for configuring Get_it
IntervalStreamTransformer<S>
Creates a Stream that emits each item in the Stream after a given duration.
LazySingleton
Classes annotated with @LazySingleton will generate registerLazySingleton func
Level
Levels to control logging output. Logging can be enabled to include all levels above certain Level. Levels are ordered using an integer value Level.value. The predefined Level constants below are sorted as follows (in descending order): Level.SHOUT, Level.SEVERE, Level.WARNING, Level.INFO, Level.CONFIG, Level.FINE, Level.FINER, Level.FINEST, and Level.ALL.
Logger
Use a Logger to log debug messages.
LogRecord
A log entry representation used to propagate information from Logger to individual handlers.
MapNotNullStreamTransformer<T, R extends Object>
Create a Stream containing only the non-null results of applying the given transform function to each element of the Stream.
MapToStreamTransformer<S, T>
Emits the given constant value on the output Stream every time the source Stream emits a value.
MaterializeStreamTransformer<S>
Converts the onData, on Done, and onError events into Notification objects that are passed into the downstream onData listener.
MergeStream<T>
Flattens the items emitted by the given streams into a single Stream sequence.
MicroPackageModule
Module
marks a class as a register module where all property accessors rerun types are considered factories unless annotated with @singleton/lazySingleton.
Named
Used to register a dependency under a name instead of type also used to annotated named injected dependencies in constructors
NeverStream<T>
Returns a non-terminating stream sequence, which can be used to denote an infinite duration.
NoEnvOrContains
This filter validates dependencies with no environment keys or contain the provided environment
NoEnvOrContainsAll
This filter validates dependencies with no environment keys, or the ones containing all the provided environments
NoEnvOrContainsAny
This filter validates dependencies with no environment keys, or the ones containing one of the provided environments
Notification<T>
A class that encapsulates the Kind of event, value of the event in case of onData, or the Error in the case of onError. A container object that wraps the Kind of event (OnData, OnDone, OnError), and the item or error that was emitted. In the case of onDone, no data is emitted as part of the Notification.
ObjectRef<T>
A class that stores a single value.
OnErrorResumeStreamTransformer<S>
Intercepts error events and switches to a recovery stream created by the provided recoveryFn Function.
Order
Classes annotated with @Order will overwrite the automatically generated position of the
PairwiseStreamTransformer<T>
Emits the n-th and n-1th events as a pair. The first event won't be emitted until the second one arrives.
PostConstruct
methods annotated with postConstruct will be called in a cascade manner after being constructed
PreResolve
Futures annotated with preResolve will be pre-awaited before they're registered inside of GetIt
PublishConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream.
PublishSubject<T>
Exactly like a normal broadcast StreamController with one exception: this class is both a Stream and Sink.
RaceStream<T>
Given two or more source streams, emit all of the items from only the first of these streams to emit an item or notification.
RangeStream
Returns a Stream that emits a sequence of Integers within a specified range.
RepeatStream<T>
Creates a Stream that will recreate and re-listen to the source Stream the specified number of times until the Stream terminates successfully.
ReplayConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream that replays emitted items to any new listener, and provides synchronous access to the list of emitted values.
ReplayStream<T>
An Stream that provides synchronous access to the emitted values
ReplaySubject<T>
A special StreamController that captures all of the items that have been added to the controller, and emits those as the first items to any new listener.
RetryStream<T>
Creates a Stream that will recreate and re-listen to the source Stream the specified number of times until the Stream terminates successfully.
RetryWhenStream<T>
Creates a Stream that will recreate and re-listen to the source Stream when the notifier emits a new value. If the source Stream emits an error or it completes, the Stream terminates.
Rx
A utility class that provides static methods to create the various Streams provided by RxDart.
SampleStreamTransformer<T>
A StreamTransformer that, when the specified window Stream emits an item or completes, emits the most recently emitted item (if any) emitted by the source Stream since the previous emission from the sample Stream.
ScanStreamTransformer<S, T>
Applies an accumulator function over an stream sequence and returns each intermediate result. The seed value is used as the initial accumulator value.
Scope
Used to annotate dependencies which are registered under a different scope than main-scope
SequenceEqualStream<S, T>
Determine whether two Streams emit the same sequence of items. You can provide an optional equals handler to determine equality.
ShadowChangeHandlers
If an object implements the ShadowChangeHandler if will get notified if an Object with the same registration type and name is registered on a higher scope which will shadow it. It also will get notified if the shadowing object is removed from GetIt
SharedValue<T>
SimpleEnvironmentFilter
A simple filter that can be used directly for simple use cases without having to extend the base EnvironmentFilter
Singleton
Classes annotated with @Singleton will generate registerSingleton function
SkipLastStreamTransformer<T>
Skip the last count items emitted by the source Stream
SkipUntilStreamTransformer<S, T>
Starts emitting events only after the given stream emits an event.
StartWithManyStreamTransformer<S>
Prepends a sequence of values to the source Stream.
StartWithStreamTransformer<S>
Prepends a value to the source Stream.
StatefulHookWidget
A StatefulWidget that can use a Hook.
Store<State, Action>
A store of mutable state that allows mutations by dispatching actions.
Subject<T>
The base for all Subjects. If you'd like to create a new Subject, extend from this class.
SwitchIfEmptyStreamTransformer<S>
When the original stream emits no items, this operator subscribes to the given fallback stream and emits items from that stream instead.
SwitchLatestStream<T>
Convert a Stream that emits Streams (aka a 'Higher Order Stream') into a single Stream that emits the items emitted by the most-recently-emitted of those Streams.
SwitchMapStreamTransformer<S, T>
Converts each emitted item into a new Stream using the given mapper function. The newly created Stream will be be listened to and begin emitting items, and any previously created Stream will stop emitting.
TakeLastStreamTransformer<T>
Emits only the final count values emitted by the source Stream.
TakeUntilStreamTransformer<S, T>
Returns the values from the source stream sequence until the other stream sequence produces a value.
TakeWhileInclusiveStreamTransformer<S>
Emits values emitted by the source Stream so long as each value satisfies the given test. When the test is not satisfied by a value, it will emit this value as a final event and then complete.
ThrottleStreamTransformer<T>
A StreamTransformer that emits a value from the source Stream, then ignores subsequent source values while the window Stream is open, then repeats this process.
TimeInterval<T>
A class that represents a snapshot of the current value emitted by a Stream, at a specified interval.
TimeIntervalStreamTransformer<S>
Records the time interval between consecutive values in an stream sequence.
TimerStream<T>
Emits the given value after a specified amount of time.
Timestamped<T>
A class that represents a snapshot of the current value emitted by a Stream, at a specified timestamp.
TimestampStreamTransformer<S>
Wraps each item emitted by the source Stream in a Timestamped object that includes the emitted item and the time when the item was emitted.
UsingStream<T, R>
When listener listens to it, creates a resource object from resource factory function, and creates a Stream from the given factory function and resource as argument. Finally when the stream finishes emitting items or stream subscription is cancelled (call StreamSubscription.cancel or Stream.listen(cancelOnError: true)), call the disposer function on resource object.
ValueConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream that replays the latest value to any new listener, and provides synchronous access to the latest emitted value.
ValueStream<T>
An Stream that provides synchronous access to the last emitted item
WhereNotNullStreamTransformer<T extends Object>
Create a Stream which emits all the non-null elements of the Stream, in their original emission order.
WhereTypeStreamTransformer<S, T>
This transformer is a shorthand for Stream.where followed by Stream.cast.
WillSignalReady
If your singleton that you register wants to use the manually signalling of its ready state, it can implement this interface class instead of using the signalsReady parameter of the registration functions (you don't really have to implement much ;-) )
WindowCountStreamTransformer<T>
Buffers a number of values from the source Stream by count then emits the buffer as a Stream and clears it, and starts a new buffer each startBufferEvery values. If startBufferEvery is not provided, then new buffers are started immediately at the start of the source and when each buffer closes and is emitted.
WindowStreamTransformer<T>
Creates a Stream where each item is a Stream containing the items from the source sequence.
WindowTestStreamTransformer<T>
Creates a Stream where each item is a Stream containing the items from the source sequence, batched whenever test passes.
WithLatestFromStreamTransformer<S, T, R>
A StreamTransformer that emits when the source stream emits, combining the latest values from the two streams using the provided function.
ZipStream<T, R>
Merges the specified streams into one stream sequence using the given zipper Function whenever all of the stream sequences have produced an element at a corresponding index.

Enums

BdayaGetItHookMode
Kind
The type of event used in Notification

Mixins

BdayaDisposeHandlerMixin
BdayaIsLoadingMixin
BdayaLifeCycleMixin
Should always be used with useViewController hook
BdayaLoggableMixin
BdayaRouterListenableMixin
HookElement
An Element that uses a HookWidget as its configuration.

Extensions

AddToCompositeSubscriptionExtension on StreamSubscription<T>
Extends the StreamSubscription class with the ability to be added to CompositeSubscription container.
BdayaLoadableAreaExt on BdayaRxLoadableArea
BufferExtensions on Stream<T>
Extends the Stream class with the ability to buffer events in various ways
ConcatExtensions on Stream<T>
Extends the Stream class with the ability to concatenate one stream with another.
ConnectableStreamExtensions on Stream<T>
Extends the Stream class with the ability to transform a single-subscription Stream into a ConnectableStream.
DebounceExtensions on Stream<T>
Extends the Stream class with the ability to debounce events in various ways
DefaultIfEmptyExtension on Stream<T>
DelayExtension on Stream<T>
Extends the Stream class with the ability to delay events being emitted
DelayWhenExtension on Stream<T>
Extends the Stream class with the ability to delay events being emitted.
DematerializeExtension on Stream<Notification<T>>
Converts the onData, onDone, and onError Notifications from a materialized stream into normal onData, onDone, and onError events.
DistinctUniqueExtension on Stream<T>
Extends the Stream class with the ability to skip items that have previously been emitted.
DoExtensions on Stream<T>
Extends the Stream class with the ability to execute a callback function at different points in the Stream's lifecycle.
EndWithExtension on Stream<T>
Extends the Stream class with the ability to emit the given value as the final item before closing.
EndWithManyExtension on Stream<T>
Extends the Stream class with the ability to emit the given value as the final item before closing.
EnumExt on Map<String, dynamic>
ExhaustMapExtension on Stream<T>
Extends the Stream class with the ability to transform the Stream into a new Stream. The new Stream emits items and ignores events from the source Stream until the new Stream completes.
FlatMapExtension on Stream<T>
Extends the Stream class with the ability to convert the source Stream into a new Stream each time the source emits an item.
GroupByExtension on Stream<T>
Extends the Stream class with the ability to convert events into Streams of events that are united by a key.
IgnoreElementsExtension on Stream<T>
Extends the Stream class with the ability to skip, or ignore, data events.
IntervalExtension on Stream<T>
Extends the Stream class with the ability to emit each item after a given duration.
LocalizedStrExt on BdayaLocalizedStr
LogFutureExt on Future<T>
LogStreamsExt on Stream<T>
MapNotNullExtension on Stream<T>
Extends the Stream class with the ability to convert the source Stream to a Stream containing only the non-null results of applying the given transform function to each element of this Stream.
MapToExtension on Stream<S>
Extends the Stream class with the ability to convert each item to the same value.
MaterializeExtension on Stream<T>
Extends the Stream class with the ability to convert the onData, on Done, and onError events into Notifications that are passed into the downstream onData listener.
MaxExtension on Stream<T>
Extends the Stream class with the ability to transform into a Future that completes with the largest item emitted by the Stream.
MergeExtension on Stream<T>
Extends the Stream class with the ability to merge one stream with another.
MinExtension on Stream<T>
Extends the Stream class with the ability to transform into a Future that completes with the smallest item emitted by the Stream.
OnErrorExtensions on Stream<T>
Extends the Stream class with the ability to recover from errors in various ways
PairwiseExtension on Stream<T>
Extends the Stream class with the ability to emit the nth and n-1th events as a pair
SampleExtensions on Stream<T>
Extends the Stream class with the ability to sample events from the Stream
ScanExtension on Stream<T>
Extends
SetX on Set<T>
SkipLastExtension on Stream<T>
Extends the Stream class with the ability to skip the last count items emitted by the source Stream
SkipUntilExtension on Stream<T>
Extends the Stream class with the ability to skip events until another Stream emits an item.
StartWithExtension on Stream<T>
Extends the Stream class with the ability to emit the given value as the first item.
StartWithManyExtension on Stream<T>
Extends the Stream class with the ability to emit the given values as the first items.
StreamToListenableExt on Stream
StringCheckExt on String?
SwitchIfEmptyExtension on Stream<T>
Extend the Stream class with the ability to return an alternative Stream if the initial Stream completes with no items.
SwitchMapExtension on Stream<T>
Extends the Stream with the ability to convert one stream into a new Stream whenever the source emits an item. Every time a new Stream is created, the previous Stream is discarded.
TakeLastExtension on Stream<T>
Extends the Stream class with the ability receive only the final count events from the source Stream.
TakeUntilExtension on Stream<T>
Extends the Stream class with the ability receive events from the source Stream until another Stream produces a value.
TakeWhileInclusiveExtension on Stream<T>
Extends the Stream class with the ability to take events while they pass the condition given and include last event that doesn't pass the condition.
ThrottleExtensions on Stream<T>
Extends the Stream class with the ability to throttle events in various ways
TimeIntervalExtension on Stream<T>
Extends the Stream class with the ability to record the time interval between consecutive values in an stream
TimeStampExtension on Stream<T>
Extends the Stream class with the ability to wrap each item emitted by the source Stream in a Timestamped object that includes the emitted item and the time when the item was emitted.
WhereNotNullExtension on Stream<T?>
Extends the Stream class with the ability to convert the source Stream to a Stream which emits all the non-null elements of this Stream, in their original emission order.
WhereTypeExtension on Stream<T>
Extends the Stream class with the ability to filter down events to only those of a specific type.
WindowExtensions on Stream<T>
Extends the Stream class with the ability to window
WithLatestFromExtensions on Stream<T>
Extends the Stream class with the ability to merge the source Stream with the last emitted item from another Stream.
ZipWithExtension on Stream<T>
Extends the Stream class with the ability to zip one Stream with another.

Constants

ansi_default → const String
ansi_esc → const String
ansiDefault → const String
Reset all colors and options for current SGRs to terminal defaults.
ansiEscape → const String
ANSI Control Sequence Introducer, signals the terminal for new settings.
ansiResetBackground → const String
Ansi codes that default the terminal's background color without altering the foreground, when printed.
ansiResetForeground → const String
Ansi codes that default the terminal's foreground color without altering the background, when printed.
defaultLevel → const Level
The default Level.
dev → const Environment
preset instance of common env name
disposeMethod → const DisposeMethod
const instance of DisposeMethod with default arguments
factoryMethod → const FactoryMethod
const instance of FactoryMethod with default values
factoryParam → const FactoryParam
const instance of FactoryParam with default arguments
ignoreParam → const IgnoreParam
const instance of IgnoreParam
injectable → const Injectable
const instance of Injectable with default arguments
injectableInit → const InjectableInit
const instance of InjectableInit with default arguments
kEnvironmentsFilterName → const String
kEnvironmentsName → const String
instance name for the Set of environment keys that's registered internally inside of GetItHelper
lazySingleton → const LazySingleton
const instance of LazySingleton with default arguments
microPackageInit → const InjectableInit
const instance of InjectableInit.microPackage with default arguments
module → const Module
const instance of Module with default arguments
named → const Named
const instance of Named with default arguments
order → const Order
const instance of Order with default arguments
postConstruct → const PostConstruct
const instance of PostConstruct with default arguments
preResolve → const PreResolve
const instance of PreResolve with default arguments
prod → const Environment
preset instance of common env name
singleton → const Singleton
const instance of Singleton with default arguments
test → const Environment
preset instance of common env name
useTextEditingController → const _TextEditingControllerHookCreator
Creates a TextEditingController, either via an initial text or an initial TextEditingValue.

Properties

ansiColorDisabled bool
Globally enable or disable AnsiPen settings.
getter/setter pair
bdayaDefaultLoadableAreaErrorBuilder BdayaLoadableAreaErrorBuilderFunction
getter/setter pair
bdayaDefaultLoadableAreaIsLoadingBuilder BdayaLoadableAreaLoadingBuilderFunction
getter/setter pair
bdayaDefaultLoggerName String Function(Object)
getter/setter pair
color_disabled bool
getter/setter pair
debugHotReloadHooksEnabled bool
Whether to behave like in release mode or allow hot-reload for hooks.
getter/setter pair
errorPen AnsiPen
final
hierarchicalLoggingEnabled bool
Whether to allow fine-grain logging and configuration of loggers in a hierarchy.
getter/setter pair
infoPen AnsiPen
final
recordStackTraceAtLevel Level
Automatically record stack traces for any message of this level or above.
getter/setter pair

Functions

bdayaOnRecordHandlerFactory({bool showSequenceNumber = true, bool showLevel = true, bool showLoggerName = true, bool showTime = true, bool showError = true, bool showStackTrace = true}) → void Function(LogRecord record)
initBdayaDependencies(GetIt instance) → void
resetBackground() String
resetForeground() String
setAnsiColors(bool isEnabled) → void
setHashUrlStrategy() → void
setPathUrlStrategy() → void
throwIf(bool condition, Object error) → void
Two handy functions that help me to express my intention clearer and shorter to check for runtime errors
throwIfNot(bool condition, Object error) → void
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.
useBdayaViewController<TController extends Object>({BdayaGetItHookMode hookMode = BdayaGetItHookMode.lazySingleton, String? instanceName, Object? param1, Object? param2, List<Object?>? keys, GetIt? getIt}) → TController
useCallback<T extends Function>(T callback, [List<Object?> keys = const <Object>[]]) → T
Cache a function across rebuilds based on a list of keys.
useContext() BuildContext
Obtains the BuildContext of the building HookWidget.
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.
useEffect(Dispose? effect(), [List<Object?>? keys]) → void
Useful for side-effects and optionally canceling them.
useExpansionTileController({List<Object?>? keys}) ExpansionTileController
Creates a ExpansionTileController that will be disposed automatically.
useFocusNode({String? debugLabel, FocusOnKeyCallback? onKey, FocusOnKeyEventCallback? onKeyEvent, bool skipTraversal = false, bool canRequestFocus = true, bool descendantsAreFocusable = true}) FocusNode
Creates an automatically disposed FocusNode.
useFocusScopeNode({String? debugLabel, FocusOnKeyCallback? onKey, 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.
useMaterialStatesController({Set<MaterialState>? values, List<Object?>? keys}) MaterialStatesController
Creates a MaterialStatesController that will be disposed automatically.
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.
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.
usePageController({int initialPage = 0, bool keepPage = true, double viewportFraction = 1.0, 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<State, Action>(Reducer<State, Action> reducer, {required State initialState, required Action initialAction}) Store<State, Action>
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, 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.
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, 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.
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.

Typedefs

BdayaLoadableAreaCustomBuilderFunction = Widget Function(BuildContext context, BdayaLoadableArea area)
BdayaLoadableAreaErrorBuilderFunction = Widget Function(BuildContext context, String displayName, Object error, StackTrace? st)
BdayaLoadableAreaLoadingBuilderFunction = Widget Function(BuildContext context, String displayName)
BdayaMultiLoadableAreaCustomBuilderFunction = Widget Function(BuildContext context, List<BdayaLoadableArea> area)
BdayaRxLoadableArea = SharedValue<BdayaLoadableArea>
BrightnessCallback = FutureOr<void> Function(Brightness previous, Brightness current)
A callback triggered when the platform brightness changes.
Dispose = void Function()
A function called when the state of a widget is destroyed.
DisposingFunc<T> = FutureOr Function(T param)
Signature for disposing function because closures like (x){} have a return type of Null we don't use FutureOr<void>
EnvironmentFilterFunc = bool Function(Set<String>)
FactoryFunc<T> = T Function()
Signature of the factory function used by non async factories
FactoryFuncAsync<T> = Future<T> Function()
Signature of the factory function used by async factories
FactoryFuncParam<T, P1, P2> = T Function(P1 param1, P2 param2)
For Factories that expect up to two parameters if you need only one use void for the one you don't use
FactoryFuncParamAsync<T, P1, P2> = Future<T> Function(P1 param1, P2 param2)
For async Factories that expect up to two parameters if you need only one use void for the one you don't use
GoRouterRouteMatch = RouteMatchList
IsMounted = bool Function()
Used by useIsMounted to allow widgets to determine if the Widget is still in the widget tree or not.
LifecycleCallback = FutureOr<void> Function(AppLifecycleState? previous, AppLifecycleState current)
A callback triggered when the app life cycle changes.
Reducer<State, Action> = State Function(State state, Action action)
Composes an Action and a State to create a new State.
ScopeDisposeFunc = FutureOr Function()
Signature for disposing function on scope level