LocalVariable class
A Variable is a single design token that defines values for each of the modes in its VariableCollection.
These values can be applied to various kinds of design properties.
- Available extensions
- Annotations
-
- @JsonSerializable.new(explicitToJson: true)
- @CopyWith.new()
- @immutable
Constructors
-
LocalVariable({required String id, required String name, required String key, required String variableCollectionId, required VariableResolvedDataType resolvedType, required Map<
String, VariableValue> valuesByMode, required bool remote, required String description, required List<VariableScope> scopes, required VariableCodeSyntax codeSyntax, bool deletedButReferenced = false}) -
const
-
LocalVariable.fromJson(Map<
String, Object?> json) -
factory
Properties
- codeSyntax → VariableCodeSyntax
-
final
- copyWith → _$LocalVariableCWProxy
-
Available on LocalVariable, provided by the $LocalVariableCopyWith extension
Returns a callable class used to build a new instance with modified fields. Example:instanceOfLocalVariable.copyWith(...)orinstanceOfLocalVariable.copyWith.fieldName(...).no setter - deletedButReferenced → bool
-
Indicates that the variable was deleted in the editor, but the document
may still contain references to the variable.
final
- description → String
-
The description of this variable.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether this variable is hidden when publishing the current file as a
library.
final
- id → String
-
The unique identifier of this variable.
final
- key → String
-
The key of this variable.
final
- name → String
-
The name of this variable.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- remote → bool
-
Whether this variable is remote.
final
- resolvedType → VariableResolvedDataType
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
VariableScope> -
An array of scopes in the UI where this variable is shown.
final
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited -
valuesByMode
→ Map<
String, VariableValue> -
The values for each mode of this variable.
final
- variableCollectionId → String
-
The id of the variable collection that contains this variable.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited