TextTransformer class
A transformer that replaces text content in a Figma text node.
- Inheritance
-
- Object
- NodeTransformer
- TextTransformer
Constructors
-
TextTransformer({required NodeSelector selector, required String text, List<
NodeTransformer> childTransformers = const []}) - Creates a transformer that replaces text in a Figma text node.
- TextTransformer.byName(String name, {required String text, bool exact = true})
-
Factory method to create a text transformer for nodes with a specific name.
factory
Properties
-
childTransformers
→ List<
NodeTransformer> -
Transformers to apply to child nodes of the selected node.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selector → NodeSelector
-
The selector that determines which nodes this transformer applies to.
finalinherited
- transform → Widget Function(TransformContext context, Widget widget)
-
The function that performs the transformation on the selected node.
finalinherited
Methods
-
appliesTo(
Node node, Node? parent) → bool -
Checks if this transformer should be applied to the given node.
inherited
-
applyTransform(
TransformContext context) → Widget -
Applies the transformation to the given context.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited