anchor.diff:    }
   }
   
  -const double _kFrameTime = 1000 / 60;
  -
   class AnimationGenerator extends FrameGenerator {
   
     Stream<double> get onTick => _stream;
  
positive.code:   final double end;
    final Curve curve;
    Stream<double> _stream;
  
    AnimationGenerator(this.duration, {
      this.begin: 0.0,
  
negative.code:   }):super(onDone: onDone) {
      double startTime = 0.0;
      double targetTime = 0.0;
      _stream = super.onTick.map((timeStamp) {
        if (startTime == 0.0) {
          startTime = timeStamp;
          targetTime = startTime + duration;
        }
        return math.min((timeStamp - startTime) / duration, 1.0);
      })
      .takeWhile(_checkForCompletion)
      .map((t) =>  begin + (end - begin) * curve.transform(t));
    }
  
    bool _checkForCompletion(double t) {
      if (_done)
        return false;
      _done = t >= 1;
      return true;
    }
  }
  
  