This reverts commit 5fd259be24.
This commit is contained in:
@@ -39,6 +39,7 @@ final CatmullRomSpline path = CatmullRomSpline(
|
||||
],
|
||||
startHandle: const Offset(0.93, 0.93),
|
||||
endHandle: const Offset(0.18, 0.23),
|
||||
tension: 0.0,
|
||||
);
|
||||
|
||||
class FollowCurve2D extends StatefulWidget {
|
||||
@@ -73,7 +74,7 @@ class _FollowCurve2DState extends State<FollowCurve2D>
|
||||
animation = CurvedAnimation(parent: controller, curve: widget.curve);
|
||||
// Have the controller repeat indefinitely. If you want it to "bounce" back
|
||||
// and forth, set the reverse parameter to true.
|
||||
controller.repeat();
|
||||
controller.repeat(reverse: false);
|
||||
controller.addListener(() => setState(() {}));
|
||||
}
|
||||
|
||||
@@ -106,6 +107,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
child: FollowCurve2D(
|
||||
path: path,
|
||||
curve: Curves.easeInOut,
|
||||
duration: const Duration(seconds: 3),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: Colors.yellow,
|
||||
|
||||
Reference in New Issue
Block a user