-
-
Couldn't load subscription status.
- Fork 10
Open
Description
I'm not sure if that's an improvement.
Removing the public angle and distance properties would be a breaking change
/// A path transformation that moves the initial position along a straight line.
///
/// This transformation moves the position in a straight line defined by a distance
/// and an optional angle. The movement is linear and calculated using trigonometric
/// functions based on the angle.
final class StraightPathTransformation extends TweenPathTransformation {
/// Creates a [StraightPathTransformation] with the given [distance] and an optional [angle].
///
/// The [angle] parameter allows specifying the angle of the straight line in degrees.
/// The [distance] parameter specifies how far the position moves along the straight line.
StraightPathTransformation({required double distance, double angle = 0})
: super(
tween: Tween(
start: Offset.zero,
end: Offset.fromDirection(radians(angle), distance),
),
);
}Metadata
Metadata
Assignees
Labels
No labels