RuntimeActionContext class
The ActionContext (and ActionHost) of a screen: CoreActionContext plus what the first-party features' handlers read.
- Inheritance
-
- Object
- CoreActionContext
- RuntimeActionContext
- Implementers
Constructors
-
RuntimeActionContext({required ValueScope scope, ExpressionEngine expressions = const Expressions(), CodelesslyServices? services, ActionUi ui = const NoActionUi(), Map<
String, AppFunction> functions = const {}, RenderTree? tree, NodeValues? nodeValues, void onError(Object error, StackTrace stack, String? action)?, void onActionErrorEvent(Json event)?, void refreshAuthValues(AuthOperation operation)?, AppDataSources? appData, bool declareMissing = false, PaywallSession? paywall, Future<PaywallResult> openPaywall(String placement)?, Future<PaywallResult> presentPaywall(String placement, PaywallPresentation presentation)?, List<ScriptDef> scripts = const [], List<Object> extensions = const [], List<VoidCallback> ? disposers, FailedActions? failed})
Properties
- appData → AppDataSources?
-
The app's shared live data (
loadCloudDatawithscope: app); null: such loads are the screen's.final - declareMissing → bool
-
Whether setVariable declares a variable no scope declares (the app
setting values), on the nearest variable scope. Actions only set
declared variables.
finalinherited
-
disposers
→ List<
VoidCallback> -
What onDispose registered: shared by this context's copies (copy).
no setterinherited
- expressions → ExpressionEngine
-
finalinherited
-
extensions
→ List<
Object> -
What the app shell attaches for its features' handlers, found by type
(extension): the core carries them without reading them.
finalinherited
- failed → FailedActions
-
The failed action chain the screen's
actionErrorreaction can run again (retryFailed); shared by this context's copies.finalinherited -
functions
→ Map<
String, AppFunction> -
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- nodeValues → NodeValues?
-
Where set value and set variant actions put node values.
finalinherited
- onActionErrorEvent → void Function(Json event)?
-
Authored canvas error reactions; separate from the host's raw error
callback. Omitted while running an error reaction to prevent recursion.
finalinherited
- onError → void Function(Object error, StackTrace stack, String? action)?
-
Gets the errors of failed actions; null: logged to the services'
analytics when they have it, else printed.
finalinherited
-
openPaywall
→ Future<
PaywallResult> Function(String placement)? -
Opens a server-resolved placement; supplied by the app shell.
final
- paywall → PaywallSession?
-
The paywall a paywall screen's actions act on.
final
-
presentPaywall
→ Future<
PaywallResult> Function(String placement, PaywallPresentation presentation)? -
Opens a placement as PaywallPresentation says (the
openPaywallaction's transition); supplied by the app shell. Without it, openPaywall opens it with the default transition.final - refreshAuthValues → void Function(AuthOperation operation)?
-
Synchronizes host-owned auth values after a completed native operation,
before the next authored action reads them. Expression reads stay pure.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → ValueScope
-
finalinherited
-
scripts
→ List<
ScriptDef> -
The scripts its run script actions run (the layout's).
finalinherited
- services → CodelesslyServices
-
finalinherited
- tree → RenderTree?
-
The screen's node tree (scroll to a node, its text fields).
finalinherited
- ui → ActionUi
-
finalinherited
Methods
-
copy(
ValueScope scope, {bool suppressErrorEvents = false}) → RuntimeActionContext -
This context over
scope(without its error events, withsuppressErrorEvents). A subclass overrides it to stay itself.override -
dispose(
) → void -
Runs what onDispose registered.
inherited
-
extension<
T extends Object> () → T? -
The attachment of type
T, if any.inherited -
Navigation (implemented by the app shell).
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
VoidCallback callback) → void -
Runs when the screen goes (cloud data streams a load action opened).
inherited
-
reportError(
Object error, StackTrace stack, {String? action}) → void -
Reports an action that failed (its chain stopped).
inherited
-
setVariable(
String name, Object? value) → void -
Sets variable
name(or a path into one:draft.title,rows[1]) in the scope that declares it; the boxes that read it re-apply.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
withoutActionErrorEvents(
) → RuntimeActionContext -
An error reaction keeps the same services, variables and host error
callback, but cannot recursively dispatch more authored error events.
override
-
withScope(
ValueScope scope) → RuntimeActionContext -
This context reading from
scope(a list item's) instead.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited