DefaultViewportTransition class final

A ViewportTransition that provides a default animation for viewport changes.

The DefaultViewportTransition offers smooth and visually appealing animations for all viewport transitions. It automatically determines the best animation settings to ensure a consistent and polished user experience.

Note: It is recommended to use the default animation with the FollowPuckViewportState viewport, as it supports moving animation targets like the user location puck. Other animation options may not handle moving targets as smoothly.

Example

final viewportTransition = DefaultViewportTransition(
  maxDuration: Duration(milliseconds: 3500),
);

This creates a default viewport transition with a maximum animation duration of 3.5 seconds.

Inheritance

Constructors

DefaultViewportTransition.new({Duration maxDuration = const Duration(milliseconds: 3500)})
Creates a DefaultViewportTransition with an optional maxDuration.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxDuration Duration
The maximum duration of the animation.
final
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