utopia_arch library

Classes

ButtonState
Collapsible
CombinedInitializationState
CombinedReporter
ComputedIterableWrapper<I extends Iterable>
ComputedMutableValue<T>
ComputedState<T>
ComputedStateValue<T>
ComputedStateValueFailed
ComputedStateValueInProgress<T>
ComputedStateValueNotInitialized
ComputedStateValueReady<T>
ComputedStateWrapper<E>
ComputedValue<T>
ConstrainedAspectRatio
CrossFadeIndexedStack
Like IndexedStack, but pages fade through during transitions and can be lazy-initialized.
DelegateMutableValue<T>
DelegateValue<T>
Factory<T>
FillViewportScrollView
ScrollView which forces child to be at least as big as the viewport in the main axis direction.
FormLayout
Scrollable layout with fixed content on the bottom.
GenericFieldState<T>
GenericFieldStateImpl<T>
GlobalErrorHandler
HasErrorMessage
HasInitialized
Hook<T>
A definition of a hook that can be used inside a HookContext via use.
HookBuilder
HookContext
A context in which hooks can be used.
HookCoordinator<T>
HookKeysEquatable
HookKeysProperty
HookProvider<T>
HookProviderContainer
HookProviderContainerWidget
HookState<T, H extends Hook<T>>
Long-lived object representing entirety of the internal state of a Hook.
HookWidget
Injector
InjectorRegister
KeyedHook<T>
KeyedHookState<T, H extends KeyedHook<T>>
LateMutableValue<T>
ListenableMutableValue<T>
ListenableMutableValueImpl<T>
ListenableNotifiable
ListenableNotifiableValue<T>
ListenableNotifiableValueImpl<T>
ListenableValue<T>
ListenableValueImpl<T>
LoaderWrapperLayout
LoggerReporter
MultiWidget
Builds multiple nested widgets.
MutableComputedState<T>
MutableGenericFieldState<T>
MutableGenericFieldStateImpl<T>
MutableInjector
MutableSubmitState
MutableValue<T>
Simpler alternative to ValueNotifier.
MutableValueImpl<T>
NestedNavigator
Notifiable
NotifiableValue<T>
NotifiableValueImpl<T>
OverflowTransformBox
PageControllerWrapper
PersistedState<T extends Object>
PreferencesService
PrefixedReporter
PropertyMutableValue<T>
ProviderContext
ProviderWidget
RefreshableComputedIterableWrapper<I extends Iterable>
RefreshableComputedState<T>
RefreshableComputedStateWrapper<E>
Reporter
ReporterGlobalErrorHandler
Retryable
RouteConfig<T>
ScopedNavigatorState
SimpleHookContext<R>
SimpleHookProviderContainer
SubmitState
TabControllerWrapper
TextEditingControllerWrapper
TopBottomLayout
  • If top + bottom occupies less than available height, they are laid in space between them.
  • Otherwise, the layout is scrollable and there's no space between top and bottom.
  • UiGlobalError
    UnFocusOnTap
    Validatable<T>
    Validators
    Value<T>
    ValueImpl<T>
    ValueProvider<T>

    Mixins

    ComputedStateMixin<T>
    DelegateListenable
    HookContextMixin
    Mixin with common parts of HookContext implementations.
    HookContextStateMixin<W extends StatefulWidget>
    HookProviderContainerWidgetMixin
    HookProviderContainerWidgetStateMixin<W extends HookProviderContainerWidgetMixin>
    HookStateDiagnosticableMixin<T, H extends Hook<T>>
    A mixin that provides default implementation for Diagnosticable for HookState.
    KeyedHookStateMixin<T, H extends KeyedHook<T>>
    NeverTriggeringListenable
    Implementation of a Listenable that never triggers any listeners,

    Extensions

    AnyExtensions on T
    BoolMutableValueExtensions on MutableValue<bool>
    BoolValueNotifierExtensions on ValueNotifier<bool>
    ButtonStateSubmitStateX on SubmitState
    ButtonStateX on ButtonState
    ComputedStateX on ComputedState<T>
    ContextExtensions on BuildContext
    FicBooleanExtension on bool
    See also: compareObject, FicComparableExtension, FicComparatorExtension, sortBy, sortLike
    FicComparableExtension on Object?
    FicComparatorExtension on int
    The if0 extension lets you nest comparators. For example:
    FicIterableExtension on Iterable<T>
    See also: FicListExtension, FicSetExtension
    FicIterableExtensionTypeNullable on Iterable<T?>
    See also: FicListExtension, FicSetExtension
    FicIterableOfMapEntryExtension on Iterable<MapEntry<K, V>>
    FicIteratorExtension on Iterator<T>
    See also: FicIterableExtension
    FicListExtension on List<T>
    FicListExtensionNullable on List<T?>
    FicMapEntryExtension on MapEntry<K, V>
    FicMapExtension on Map<K, V>
    See also: FicMapOfSetsExtension
    FicMapIteratorExtension on Iterator<MapEntry<K, V>>
    See also: FicIterableExtension, FicIteratorExtension
    FicMapOfSetsExtension on Map<K, Set<V>>
    See also: FicMapExtension
    FicNumberExtension on T
    FicNumberExtensionNullable on T?
    FicObjectExtension on Object?
    FicSetExtension on Set<T>
    See also: FicListExtension
    FICZipExtension on Iterable<(U, V)>
    InjectorBuildContextX on BuildContext
    IterableExtension on Iterable<T>
    IterableExtensionNullable on Iterable<T?>
    ListenableNotifiableValueExtension on ListenableNotifiableValue<T>
    ListenableValueX on ListenableValue<T>
    ListExtensions on List<T>
    MutableValueExtensions on MutableValue<T>
    NotifiableExtension on Notifiable
    NotifiableValueExtension on NotifiableValue<T>
    NotNullMutableValueExtensions on MutableValue<T>
    NullableMutableValueExtensions on MutableValue<T?>
    NullableValueExtensions on Value<T?>
    ProviderBuildContextExtensions on BuildContext
    ProviderContextExtensions on ProviderContext
    SetExtensions on Set<T>
    StaggeredAnimationControllerExtensions on AnimationController
    StringExtensions on String
    ValidatableExtensions on Validatable<T>
    ValueExtensions on Value<T>
    ValueListenableX on ValueListenable<T>
    ValueNotifierExtensions on ValueNotifier<T>
    ValueNotifierX on ValueNotifier<T>

    Constants

    hookKeysEmpty → const List<Object?>
    hookKeysEquality → const ListEquality<Object?>

    Functions

    allTrue(Iterable<bool> values) bool
    anyTrue(Iterable<bool> values) bool
    buildInjector(void block(InjectorRegister register)) Injector
    compareBy<T>(Iterable<Comparable Function(T)> selectors) Comparator<T>
    runWithErrorHandler(GlobalErrorHandler handler, void block()) → void
    runWithReporterAndUiErrors(Reporter reporter, void block(Stream<UiGlobalError> uiErrors)) → void
    Handles global errors and sends them to reporter and async of UiGlobalError.
    use<T>(Hook<T> hook) → T
    Register hook in the current HookContext and return its value.
    useAnimationController({Duration? duration, Duration? reverseDuration, String? debugLabel, double initialValue = 0, double lowerBound = 0, double upperBound = 1, TickerProvider? vsync, AnimationBehavior animationBehavior = AnimationBehavior.normal}) AnimationController
    useAppLifecycleState({void onPaused()?, void onResumed()?, void onHidden()?, void onInactive()?}) AppLifecycleState
    useAsyncSnapshotErrorHandler(AsyncSnapshot<Object?>? snapshot, {void onError(Object, StackTrace)?}) → void
    useAutoComputedState<T>(Future<T> compute(), {bool shouldCompute = true, HookKeys keys = hookKeysEmpty, Duration debounceDuration = Duration.zero}) MutableComputedState<T>
    Allows for automatic refreshing of ComputedState in response to changes in keys. Refreshes also on first call.
    useBuildContext() BuildContext
    Retrieves a BuildContext from the current HookContext.
    useCombinedInitializationState(Set<Type> types) CombinedInitializationState
    useComplexPreferencesPersistedState<T extends Object, T2 extends Object>(String key, {required T2 toPreferences(T), required T fromPreferences(T2), T? defaultValue}) PersistedState<T>
    useComputedState<T>(Future<T> compute()) MutableComputedState<T>
    useContext() HookContext
    Retrieves the current HookContext.
    useDebounced<T>(T value, {required Duration duration}) → T
    useEffect(dynamic effect(), [HookKeys keys = hookKeysEmpty]) → void
    useEnumPreferencesPersistedState<T extends Enum>(String key, List<T> values, {T? defaultValue}) PersistedState<T>
    useFieldState({String? initialValue}) MutableFieldState
    useFuture<T>(Future<T>? future, {T? initialData, bool preserveState = true}) AsyncSnapshot<T>
    useFutureData<T>(Future<T>? future, {T? initialData, bool preserveState = true, void onError(Object, StackTrace)?}) → T?
    useGenericFieldState<T>({required T initialValue}) MutableGenericFieldState<T>
    useIf<T>(bool condition, T block()) → T?
    useIfNotNull<T extends Object, R>(T? value, R block(T)) → R?
    useImmediateEffect(dynamic effect(), [HookKeys keys = hookKeysEmpty]) → void
    useInjected<T>() → T
    useIsMounted() IsMounted
    useKeyed<T>(HookKeys keys, T block()) → T
    useLet<T extends Object, R>(T? value, R block(T)) → R?
    useListenable(Listenable? listenable, {bool shouldRebuild()?}) → void
    useListenableListener(Listenable? listenable, void block()) → void
    useListenableValue<T>(ListenableValue<T> listenable, {bool shouldRebuild(T prev, T curr)?}) → T
    useListenableValueListener<T>(ListenableValue<T>? listenable, void block(T)) → void
    useMap<K extends Object, T>(Set<K> keys, T block(K)) Map<K, T>
    useMemoized<T>(T block(), [HookKeys keys = hookKeysEmpty, void dispose(T)?]) → T
    useMemoizedFuture<T>(Future<T>? block(), {T? initialData, bool preserveState = true, HookKeys keys = hookKeysEmpty}) AsyncSnapshot<T>
    useMemoizedFutureData<T>(Future<T>? block(), {T? initialData, bool preserveState = true, void onError(Object, StackTrace)?, HookKeys keys = hookKeysEmpty}) → T?
    useMemoizedIf<T>(bool condition, T block(), [HookKeys keys = hookKeysEmpty]) → T?
    useMemoizedStream<T>(Stream<T>? block(), {T? initialData, bool preserveState = true, HookKeys keys = hookKeysEmpty}) AsyncSnapshot<T>
    useMemoizedStreamData<T>(Stream<T>? block(), {T? initialData, bool preserveState = true, void onError(Object, StackTrace)?, HookKeys keys = hookKeysEmpty}) → T?
    useNotifiable({bool listen = true}) ListenableNotifiable
    useNotifiableValue<T>(T create(), {bool listen = true}) ListenableNotifiableValue<T>
    usePeriodicalSignal({required Duration period, bool enabled = true}) int
    usePersistedState<T extends Object>(Future<T?> get(), Future<void> set(T? value), {bool canGet = true, HookKeys getKeys = hookKeysEmpty}) PersistedState<T>
    usePreferencesPersistedState<T extends Object>(String key, {T? defaultValue}) PersistedState<T>
    usePrevious<T>(T value, {HookKeys keys = hookKeysEmpty}) → T?
    usePreviousIfNull<T>(T? value, {HookKeys keys = hookKeysEmpty}) → T?
    usePreviousValue<T>(T value, {HookKeys keys = hookKeysEmpty}) → T?
    useProvided<T>() → T
    Retrieves a provided value of type T and registers it as a dependency of the current HookContext.
    useProvidedUnsafe(Type type) → dynamic
    Retrieves a provided value assigned to type and registers it as a dependency of the current HookContext.
    useRef<T>(T initialValue) ListenableMutableValue<T>
    useSingleTickerProvider() TickerProvider
    useState<T>(T initialValue, {bool listen = true}) ListenableMutableValue<T>
    useStream<T>(Stream<T>? stream, {T? initialData, bool preserveState = true}) AsyncSnapshot<T>
    useStreamController<T>() StreamController<T>
    useStreamData<T>(Stream<T>? stream, {T? initialData, bool preserveState = true, void onError(Object error, StackTrace stackTrace)?}) → T?
    useStreamSubscription<T>(Stream<T>? stream, FutureOr<void> block(T), {void onError(Object, StackTrace)?, void onDone()?, StreamSubscriptionStrategy strategy = StreamSubscriptionStrategy.parallel}) → void
    useSubmitButtonState(Future<void> action(), {bool enabled = true}) ButtonState
    useSubmitState() MutableSubmitState
    useValueChanged<T, R>(T value, R? valueChange(T oldValue, R? oldResult)) → R?
    useValueListenable<T>(ValueListenable<T> listenable, {bool shouldRebuild(T prev, T curr)?}) → T
    useValueListenableListener<T>(ValueListenable<T>? listenable, void block(T)) → void
    useValueWrapper<T>(T value) Value<T>
    useWithSelf<T extends Object>(T block(Value<T> self)) → T
    useWithSelfOrNull<T>(T block(Value<T?> self)) → T

    Typedefs

    AsyncValidator<T> = FutureOr<ValidatorResult?> Function(T value)
    DependencyBuilder<T> = T Function(Injector injector)
    Gets registered at the injector and then gets called by the injector to instantiate the dependency and all of its dependencies.
    EffectHookDispose = dynamic
    FieldState = GenericFieldState<String>
    HookKeys = List<Object?>
    Standard type for keys used in KeyedHook and other hooks.
    IsMounted = bool Function()
    MutableFieldState = MutableGenericFieldState<String>
    RefreshableComputedListWrapper<E> = RefreshableComputedIterableWrapper<List<E>>
    StatelessPageControllerWrapper = PageControllerWrapper
    StatelessTabControllerWrapper = TabControllerWrapper
    StatelessTextEditingControllerWrapper = TextEditingControllerWrapper
    Validator<T> = ValidatorResult? Function(T value)
    ValidatorResult = String Function(BuildContext)

    Exceptions / Errors

    ProvidedValueNotFoundException
    An exception thrown by ProviderContextExtensions.get when the requested value can't be provided.