EasingViewportTransition class final

A ViewportTransition that animates viewport changes using an easing curve.

The EasingViewportTransition allows you to define smooth animations between different viewport states by specifying a curve and a duration. This provides a customizable way to control how camera transitions occur in your application.

Example

// Using the default easing curve (easeInOut)
final transition = EasingViewportTransition(
  duration: Duration(seconds: 2),
);

// Using a custom easing curve
final transition = EasingViewportTransition(
  curve: Curves.fastOutSlowIn,
  duration: Duration(milliseconds: 1500),
);

// Using a linear easing curve
final transition = EasingViewportTransition.linear(
  duration: Duration(seconds: 1),
);

In these examples, different easing curves and durations are used to animate the viewport transitions.

Inheritance

Constructors

EasingViewportTransition({Cubic curve = Curves.easeInOut, required Duration duration})
Creates an EasingViewportTransition with the specified curve and duration.
const
EasingViewportTransition.linear({required Duration duration})
Creates an EasingViewportTransition with a linear easing curve.
const

Properties

curve → Cubic
The easing curve to use for the animation.
final
duration → Duration
The duration of the animation.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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