AFBuildContext<TStateView extends AFFlexibleStateView, TRouteParam extends AFRouteParam> class

A utility class which you can use when you have a complex screen which passes the dispatcher, screen data and param to many functions, to make things more concise.

The framework cannot pass you this itself because

Implemented types

Constructors

AFBuildContext(AFStandardBuildContextData standard, TStateView stateView, TRouteParam routeParam, AFRouteSegmentChildren? children, {bool compareChildren = true})

Properties

accessActiveScreenId AFScreenID
no setterinherited
accessScreenId AFScreenID
no setter
accessStreamPublicStateChanges Stream<AFPublicStateChange>
no setterinherited
activeWireframe AFWireframe?
no setter
c BuildContext
Shorthand for accessing the flutter build context
no setter
children AFRouteSegmentChildren?
getter/setter pair
compareChildren bool
getter/setter pair
contextNullCheck BuildContext
no setter
d AFDispatcher
Shorthand for accessing the dispatcher
no setter
debugOnlyPublicState AFPublicState?
Meant to make the public state visible in the debugger, absolutely not for runtime use.
no setter
dispatcher AFDispatcher
no setter
flutterContext BuildContext?
no setter
hashCode int
The hash code for this object.
no setteroverride
isDemoMode bool
no setterinherited
isUIEnabled bool
no setterinherited
log → Logger?
no setter
p → TRouteParam
Shorthand for accessing the route param.
no setter
routeLocation AFRouteLocation
no setter
routeParam ↔ TRouteParam
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
s → TStateView
Shorthand for accessing data from the store
no setter
screenId AFScreenID
no setter
screenTest AFScreenPrototype?
no setter
standard AFStandardBuildContextData
getter/setter pair
stateView ↔ TStateView
getter/setter pair
targetStore AFConceptualStore
no setter

Methods

accessAppPlatformInfo() AFAppPlatformInfoState
Access platform-related info like you app versions, and what OS you are running on.
accessChildParam<TChildRouteParam extends AFRouteParam>(AFWidgetID wid) → TChildRouteParam?
accessChildrenParamsOfType<TChildRouteParam extends AFRouteParam>() Iterable<TChildRouteParam>
accessCurrentState(AFAccessCurrentStateDelegate delegate) → void
Synchronously accesses the current public state, providing it to a callback.
inherited
accessLPI<TLPI extends AFLibraryProgrammingInterface>(AFLibraryProgrammingInterfaceID id) → TLPI
inherited
accessOnEventContext() AFOnEventContext
Provides access the full AFPublicState, which can be accessed in a UI event handler, but not as part of your actual build logic.
accessPushTime() AFTimeState
Access the push time in your state view, which is only accurate to your state view's time specificity.
castToStateView<TNewStateView extends AFFlexibleStateView>(AFCreateStateViewDelegate<TNewStateView> creator) AFBuildContext<TNewStateView, TRouteParam>
childrenCountConnected<TChildRouteParam extends AFRouteParam>() int
Returns the number of connected children that have a route parameter of the specified type.
closeBottomDialogFromScreen(AFScreenID dialogId, dynamic result) → void
closeBottomSheet(AFScreenID sheetId, dynamic returnValue) → void
Closes the dialog, and returns the returnValue to the callback function that was passed to showDialog.
closeBottomSheetFromScreen(AFScreenID sheetId, dynamic result) → void
closeDialog(AFScreenID dialogId, dynamic returnValue) → void
Closes the dialog, and returns the returnValue to the callback function that was passed to showDialog.
closeDrawer() → void
Called to close a drawer.
dispatch(dynamic action) → void
Dispatch an action or query.
dispatchRebuildThemeState() → void
This rebuilds the entire theme state.
executeCompositeQuery(AFCompositeQuery query) → void
inherited
executeDeferredCallback(AFID uniqueQueryId, Duration duration, AFOnResponseDelegate<AFUnused> callback) → void
inherited
executeDeferredQuery(AFDeferredQuery query) → void
A utility which delays for the specified time, then updates the resulting code.
inherited
executeEnterDemoMode({required AFStateTestID stateTestId, required AFMergePublicStateDelegate mergePublicState}) → void
inherited
executeExitDemoMode({required AFMergePublicStateDelegate mergePublicState}) → void
inherited
executeIsolateListenerQuery(AFIsolateListenerQuery query) → void
inherited
executeListenerQuery(AFAsyncListenerQuery query) → void
Dispatch an AFAsyncListenerQuery, which establishes a channel that recieves results on an ongoing basis (e.g. via a websocket).
inherited
executePeriodicQuery(AFPeriodicQuery query) → void
inherited
executeQuery(AFAsyncQuery query) → void
A utility which dispatches an asynchronous query.
inherited
executeResetToInitialState() → void
Resets your application state to it's initial state (see your static initialState method). This is often called as part of a signout process.
inherited
executeShutdownAllActiveQueries() → void
Shuts down all existing listener and deferred queries. Often called as part of a signout process.
inherited
executeShutdownListenerQuery<TQuery extends AFAsyncListenerQuery>({AFID? id}) → void
inherited
executeWireframeEvent(AFID widget, Object? eventData, {AFPressedDelegate? onSuccess}) → void
inherited
inherited
inherited
inherited
inherited
inherited
inherited
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showBottomSheet({required AFNavigatePushAction navigate, Color? backgroundColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior}) → void
Shows a bottom sheet
inherited
showDialogAFib<TReturn extends Object?>({required AFNavigatePushAction navigate, AFReturnValueDelegate<TReturn>? onReturn, bool barrierDismissible = true, Color? barrierColor, bool useSafeArea = true, bool useRootNavigator = true, RouteSettings? routeSettings, AFAsyncQuery? executeBefore, AFAsyncQuery? executeDuring}) → void
Open a dialog with the specified screen id and param
inherited
showDialogChoice({AFUIStandardChoiceDialogIcon icon = AFUIStandardChoiceDialogIcon.question, required AFRichTextBuilder title, required AFRichTextBuilder? body, required List<String> buttonTitles, required void onReturn(int?)?}) → void
inherited
showDialogChoiceText({required Object themeOrId, AFUIStandardChoiceDialogIcon icon = AFUIStandardChoiceDialogIcon.question, required Object title, Object? body, required List<String>? buttonTitles, void onReturn(int)?}) → void
inherited
showDialogErrorText({required Object themeOrId, required Object title, Object? body, List<String>? buttonTitles, void onReturn(int)?}) → void
inherited
showDialogInfoText({required Object themeOrId, required Object title, Object? body, List<String>? buttonTitles, void onReturn(int)?}) → void
inherited
showDialogWarningText({required Object themeOrId, required Object title, Object? body, List<String>? buttonTitles, void onReturn(int)?}) → void
inherited
showInAppNotification({VoidCallback? onAction, AFRichTextBuilder? actionText, required Color colorBackground, required Color colorForeground, required AFRichTextBuilder title, AFRichTextBuilder? body, Duration? duration, NotificationPosition position = NotificationPosition.top}) → void
inherited
showInAppNotificationText({required Object themeOrId, VoidCallback? onAction, Object? actionText, Color? colorBackground, Color? colorForeground, required Object title, Object? body, Duration? duration, NotificationPosition position = NotificationPosition.top}) → void
inherited
showLeftSideDrawer({AFNavigatePushAction? navigate}) → void
Open the drawer that you specified for your Scaffold.
inherited
showModalBottomSheetAFib<TReturn extends Object?>({required AFNavigatePushAction navigate, AFReturnValueDelegate<TReturn>? onReturn, Color? backgroundColor, double? elevation, AFAsyncQuery? executeBefore, AFAsyncQuery? executeDuring, ShapeBorder? shape, Clip? clipBehavior, Color? barrierColor, bool isScrollControlled = false, bool useRootNavigator = false, bool isDismissible = true, bool enableDrag = true, RouteSettings? routeSettings}) → void
Show a modal bottom sheet.
inherited
showRightSideDrawer({required AFNavigatePushAction navigate}) → void
Open the end drawer that you specified for your Scaffold.
inherited
showSnackbar(SnackBar snackbar) → void
Show a snackbar.
inherited
showSnackbarText({required Object themeOrId, required Object text, Duration duration = const Duration(seconds: 2)}) → void
Show a snackbar.
inherited
toString() String
A string representation of this object.
inherited
updateAddChildRouteParam(AFRouteParam revised) → void
updateComponentRootStateMany<TState extends AFComponentState>(List<Object> toIntegrate) → void
Dispatches an action that updates several blaues in the app state area associated with the TState type parameter.
inherited
updateComponentRootStateOne<TState extends AFComponentState>(Object toIntegrate) → void
Dispatches an action that updates a single value in the app state area associated with the TState type parameter.
inherited
updateRemoveChildRouteParam(AFWidgetID wid, {AFRouteLocation routeLocation = AFRouteLocation.screenHierarchy}) → void
updateRouteParam(AFRouteParam param) → void
updateTextField(AFWidgetID wid, String text) → void

Operators

operator ==(dynamic other) bool
The equality operator.
override