HeroAnimationScene class
Root Widget for hero animation to run.
Example:
Alignment alignment = Alignment.centerLeft;
@override Widget build(BuildContext context) { return HeroAnimationScene( duration: const Duration(milliseconds: 500), curve: Curves.easeIn, child: GestureDetector( onTap: () { setState(() { alignment = Alignment.centerRight; }); }, child: Align( alignment: alignment, child: HeroAnimation.child( tag: 'tag_0', child: const Text('SOME TEXT'), ), ), ), ); }
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- HeroAnimationScene
Constructors
- HeroAnimationScene({required Duration duration, required Widget child, Key? key, Curve curve = Curves.linear, CreateRectTween createRectTween = _defaultCreateTweenRect})
-
const
Properties
- child → Widget
-
Child subtree containing HeroAnimation's
final
- createRectTween → CreateRectTween
-
Signature for a function that takes two Rect instances and returns a
RectTween that transitions between them.
This is used with a
HeroAnimationController
to provide an animation for HeroAnimation positions that look nicer than a linear movement.final - curve → Curve
-
Curve of hero animation.
final
- duration → Duration
-
Duration of hero flight animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< HeroAnimationScene> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited