title: How do you get rid of the NoSuchMethodError below
body: <p>Hello am trying to implement a card flip animation. 
  There are three cards according to the below code. I am getting an error 
  <strong>NoSuchMethodError</strong> 
  <em>The method '/' was called on null. 
  Receiver:null
  Tried calling : /(0.333333333)</em></p>
  
  <p>The code</p>
  
  <pre><code>class _CardFlipperState extends State&lt;CardFlipper&gt; {
  double scrollPercent;
  Offset startDrag;
  double startDragPercentScroll;
  double finishScrollStart;
  double finishScrollEnd;
  AnimationController finishScrollController;
  
  void _onHorizontalDragStart(DragStartDetails details) {
  startDrag = details.globalPosition;
  startDragPercentScroll = scrollPercent;
  }
  
  void _onHorizontalDragUpdate(DragUpdateDetails details) {
  final currDrag = details.globalPosition;
  final dragDistance = currDrag.dx - startDrag.dx;
  final singleCardDragPercent = dragDistance / context.size.width;
  
  final numCards = 3;
  
  setState(() {
    scrollPercent =
        (startDragPercentScroll + (singleCardDragPercent / numCards))
            .clamp(0.0, 1.0 - (1 / numCards));
   });
   }
  
   void _onHorizontalDragEnd(DragEndDetails details) {
  
  
   setState(() {
    startDrag = null;
    startDragPercentScroll = null;
    });
    }
  
    List&lt;Widget&gt; _buildCards() {
    return [
    _buildCard(0, 3, scrollPercent),
    _buildCard(1, 3, scrollPercent),
    _buildCard(2, 3, scrollPercent),
  
     ];
     }
  
     Widget _buildCard(int cardIndex, int cardCount, double scrollPercent) {
     final cardScrollPercent = scrollPercent / (1 / cardCount);
  </code></pre>
  
  <p>The last line seems to be the problem I am just having trouble figuring out why.
  Am new on flutter</p>