CustomTransition class abstract
Abstract class for defining custom page transitions.
Implement this class to create custom transition animations for navigation.
The buildTransition method should return a widget that applies the desired
transition effect to the child widget.
Example implementation:
class FadeInTransition extends CustomTransition {
@override
Widget buildTransition(
BuildContext context,
Curve? curve,
Alignment? alignment,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeTransition(
opacity: CurvedAnimation(parent: animation, curve: curve ?? Curves.easeInOut),
child: child,
);
}
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildTransition(
BuildContext context, Curve? curve, Alignment? alignment, Animation< double> animation, Animation<double> secondaryAnimation, Widget child) → Widget -
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