From dea7c347181642c101abfc9fc2664e686659e135 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 5 Apr 2016 22:32:54 -0700 Subject: [PATCH] Allow Tweens to lerp to null. --- packages/flutter/lib/src/animation/tween.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/animation/tween.dart b/packages/flutter/lib/src/animation/tween.dart index 4221e84bb8..027dbee2f5 100644 --- a/packages/flutter/lib/src/animation/tween.dart +++ b/packages/flutter/lib/src/animation/tween.dart @@ -98,9 +98,7 @@ class Tween extends Animatable { /// This method returns `begin` and `end` when the animation values are 0.0 or 1.0, respectively. @override T evaluate(Animation animation) { - if (end == null) - return begin; - double t = animation.value; + final double t = animation.value; if (t == 0.0) return begin; if (t == 1.0)