GestureTransformer class
A transformer that makes a Figma node respond to various gestures.
- Inheritance
-
- Object
- NodeTransformer
- GestureTransformer
Constructors
-
GestureTransformer({required NodeSelector selector, VoidCallback? onTap, VoidCallback? onLongPress, VoidCallback? onDoubleTap, List<
NodeTransformer> childTransformers = const []}) - Creates a transformer that adds various gestures to a Figma node.
-
GestureTransformer.byName(String name, {VoidCallback? onTap, VoidCallback? onLongPress, VoidCallback? onDoubleTap, List<
NodeTransformer> childTransformers = const [], bool exact = true}) -
Factory method to create a gesture 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