StaticOrRuntimeControl<T> class

A component control that is configured statically or supplied by Logic at runtime.

T is the type of the static value. Use resolve to obtain this module's internal runtime input or to convert the static value into Logic.

Implementers

Constructors

StaticOrRuntimeControl({required String name, required T staticConfig, Logic? runtimeConfig})
Creates a statically or runtime-configured control.
const
StaticOrRuntimeControl.ofDynamic(dynamic config, {required String name, required T defaultValue, required T convertStatic(dynamic value)})
Creates a control from either a runtime Logic or a static value.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isRuntime → bool
Whether this value is supplied at runtime.
no setter
name → String
The module input name used for runtimeConfig.
final
runtimeConfig → Logic?
The runtime configuration signal, if this value is runtime-configurable.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
staticConfig → T
The static value used when runtimeConfig is null.
final

Methods

getRuntimeInput(Module module) → Logic?
Constructs and returns the internal input when runtime-configured.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(Module module, {required Logic staticToLogic(T value)}) → Logic
Resolves this value to Logic within module.
toString() → String
A string representation of this object.
inherited
tryRuntimeInput(Module module) → Logic?
Returns the existing internal runtime input on module, if any.

Operators

operator ==(Object other) → bool
The equality operator.
inherited