FFVariable class
Defines a variable or function call in FlutterFlow. Each variable has a source (e.g. a Page or a Row with a backend query), a variable source (e.g. Parameters for a Page, or BackendQuery for a Row), and then a series of reducers that specify the exact variable (e.g. ".name").
- Inheritance
-
- Object
- GeneratedMessage
- FFVariable
- Available extensions
Constructors
-
FFVariable({FFVariableSource? source, @Deprecated('This field is deprecated.') String? legacyNodeKey, @Deprecated('This field is deprecated.') FFParameter? legacyInitialParameter, @Deprecated('This field is deprecated.') Iterable<
FFParamReducer> ? legacyReducers, @Deprecated('This field is deprecated.') FFFunctionCall? legacyFunctionCall, FFParameterValue? defaultValue, @Deprecated('This field is deprecated.') FFRandomData? legacyRandomData, FFBaseVariable? baseVariable, Iterable<FFVariableOperation> ? operations, FFFunctionCall? functionCall, bool? hasBeenUpdated, FFNodeKeyPath? componentNodePath, Iterable<MapEntry< ? dynamicComponentAccess, @Deprecated('This field is deprecated.') String? legacyDisplayName, @Deprecated('This field is deprecated.') String? legacyActionComponentKey, FFNodeKeyReference? nodeKeyRef, FFActionComponentKeyReference? actionComponentKeyRef, FFParameterValue? uiBuilderValue, String? description})String, FFDynamicComponentAccess> > -
factory
-
FFVariable.fromBuffer(List<
int> data, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) -
factory
- FFVariable.fromJson(String json, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- actionComponentKeyRef ↔ FFActionComponentKeyReference
-
getter/setter pair
- baseVariable ↔ FFBaseVariable
-
The base variable exposed by the different modules before any of the
operations.
getter/setter pair
- componentNodePath ↔ FFNodeKeyPath
-
- @doc If we are accessing a variable from a nested component, this is the node key path to the specified widget.
getter/setter pair - defaultValue ↔ FFParameterValue
-
Default value of the variable if the result is null or empty string.
getter/setter pair
- description ↔ String
-
A plain text description of what this variable is being used for, primarily
for AI purposes.
getter/setter pair
-
dynamicComponentAccess
→ PbMap<
String, FFDynamicComponentAccess> -
Handles accessing variables for dynamic components. Map from component node
key to dynamic widget access.
no setter
- functionCall ↔ FFFunctionCall
-
A variable built from a function call - currently only String
interpolation.
getter/setter pair
- hasBeenUpdated ↔ bool
-
Whether this variable has been updated to V1
getter/setter pair
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setteroverride
- isFrozen → bool
-
Returns
trueif this message is marked read-only. Otherwisefalse.no setterinherited - legacyActionComponentKey ↔ String
-
The key of the action component associated with this variable. This should
only be used for other actions inside of an action component.
getter/setter pair
- legacyDisplayName ↔ String
-
If set, this will be used for the display name in the UI builder.
getter/setter pair
- legacyFunctionCall ↔ FFFunctionCall
-
getter/setter pair
- legacyInitialParameter ↔ FFParameter
-
Legacy (retired because it is wack): The initial parameter for this
variable. For example, a User Document param, or for GlobalProperties
the currentTimestamp param.
getter/setter pair
- legacyNodeKey ↔ String
-
The key of the node associated with this variable. Can be empty in many
cases.
getter/setter pair
- legacyRandomData ↔ FFRandomData
-
getter/setter pair
-
legacyReducers
→ PbList<
FFParamReducer> -
Old way of storing operations.
no setter
- nodeKeyRef ↔ FFNodeKeyReference
-
getter/setter pair
-
operations
→ PbList<
FFVariableOperation> -
Subsequent operations or fields done on the variable. For instance, if the
variable is the ProfilePage's User's profilePic,
sourcewill be set to CLASS_PARAMETER, node_key set to the ProfilePage's node key, initial_parameter to the User document param, and then one reducer: User document's FFParameter for profilePic field (as a reducer).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source ↔ FFVariableSource
-
getter/setter pair
- uiBuilderValue ↔ FFParameterValue
-
getter/setter pair
- unknownFields → UnknownFieldSet
-
no setterinherited
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
Throws a StateError if the message has required fields without a value.
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearActionComponentKeyRef(
) → void -
clearBaseVariable(
) → void -
clearComponentNodePath(
) → void -
clearDefaultValue(
) → void -
clearDescription(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearFunctionCall(
) → void -
clearHasBeenUpdated(
) → void -
clearLegacyActionComponentKey(
) → void -
clearLegacyDisplayName(
) → void -
clearLegacyFunctionCall(
) → void -
clearLegacyInitialParameter(
) → void -
clearLegacyNodeKey(
) → void -
clearLegacyRandomData(
) → void -
clearLegacyType(
) → void -
clearNodeKeyRef(
) → void -
clearSource(
) → void -
clearType(
) → void -
clearUiBuilderValue(
) → void -
clone(
) → FFVariable -
Creates a deep copy of the fields in this message.
override
-
copyWith(
void updates(FFVariable)) → FFVariable -
Apply
updatesto a copy of this message.override -
createEmptyInstance(
) → FFVariable -
Creates an empty instance of the same message type as this.
override
-
deepCopy(
) → T -
Available on T, provided by the GeneratedMessageGenericExtensions extension
Returns a writable deep copy of this message. -
ensureActionComponentKeyRef(
) → FFActionComponentKeyReference -
ensureBaseVariable(
) → FFBaseVariable -
ensureComponentNodePath(
) → FFNodeKeyPath -
ensureDefaultValue(
) → FFParameterValue -
ensureFunctionCall(
) → FFFunctionCall -
ensureLegacyFunctionCall(
) → FFFunctionCall -
ensureLegacyInitialParameter(
) → FFParameter -
ensureLegacyRandomData(
) → FFRandomData -
ensureNodeKeyRef(
) → FFNodeKeyReference -
ensureUiBuilderValue(
) → FFParameterValue -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
fromCompressedSerializedBuffer(
List< int> buffer, [int recursionLimit = 512]) → void -
Available on GeneratedMessage, provided by the SchemaCompressedSerializationExtensions extension
-
fromCompressedSerializedBufferString(
String buffer, [int recursionLimit = 512]) → void -
Available on GeneratedMessage, provided by the SchemaCompressedSerializationExtensions extension
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasActionComponentKeyRef(
) → bool -
hasBaseVariable(
) → bool -
hasComponentNodePath(
) → bool -
hasDefaultValue(
) → bool -
hasDescription(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
trueif a value ofextensionis present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber.inherited -
hasFunctionCall(
) → bool -
hasHasBeenUpdated(
) → bool -
hasLegacyActionComponentKey(
) → bool -
hasLegacyDisplayName(
) → bool -
hasLegacyFunctionCall(
) → bool -
hasLegacyInitialParameter(
) → bool -
hasLegacyNodeKey(
) → bool -
hasLegacyRandomData(
) → bool -
hasNodeKeyRef(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasSource(
) → bool -
hasUiBuilderValue(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Same as mergeFromBuffer, but takes a CodedBufferReader input.
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data, a JSON object, encoded as described by GeneratedMessage.writeToJson.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
otherinto this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
void updates(T)) → T -
Available on T, provided by the GeneratedMessageGenericExtensions extension
Applyupdatesto a copy of this message. -
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
toTextFormat(
) → String -
Available on GeneratedMessage, provided by the TextFormatExtension extension
Returns a TextFormat String representation of this message. -
whichLegacyType(
) → FFVariable_LegacyType -
whichType(
) → FFVariable_Type -
writeTextFormat(
StringSink sink) → void -
Available on GeneratedMessage, provided by the TextFormatExtension extension
Writes a TextFormat String representation of this message tosink. -
writeToBuffer(
) → Uint8List -
Serialize the message as the protobuf binary format.
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
Same as writeToBuffer, but serializes to the given CodedBufferWriter.
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → FFVariable -
getDefault(
) → FFVariable