-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid curve endpoint at 1.0 #23
Comments
Hi, @saikiranVu |
Another exception was thrown: Invalid curve endpoint at 1.0. I get this same error on IOS when a passcode is typed and the shaking animation is triggered |
Sometimes i have same glitch, error from console:
|
This assertion triggers reliably for me if I enter a pin incorrectly on the PasscodeScreen using From https://api.flutter.dev/flutter/animation/Curve-class.html:
The current
Which doesn't satisfy the required property. Specificaly If I change the function to be |
Thanks, it helped to figure out what was wrong in my case. Working code for me now:
|
Invalid curve endpoint at 1.0
Curves must map 0.0 to near zero and 1.0 to near one but ShakeCurve mapped 1.0 to 3.6739403974420594e-16, which is near 0.0.
@OverRide
initState() {
super.initState();
streamSubscription = widget.shouldTriggerVerification.listen((isValid) => _showValidation(isValid));
controller = AnimationController(duration: const Duration(milliseconds: 500), vsync: this);
final Animation curve = CurvedAnimation(parent: controller, curve: ShakeCurve());
animation = Tween(begin: 0.0, end: ### 10.0).animate(curve)
..addStatusListener((status) {
if (status == AnimationStatus.completed) {
setState(() {
enteredPasscode = '';
controller.value = 0;
});
}
})
..addListener(() {
setState(() {
// the animation object’s value is the changed state
});
});
}
The text was updated successfully, but these errors were encountered: