title: Flutter PageView how to make faster animations on swipe
body: <p>I have a simple PageView:</p>
  <pre><code>PageView(
    controller: _pageController,
    physics: PlatformScrollPhysics.getPlatformScrollPhysics(),
    children: [
      Text(&quot;I am Text1&quot;),
      Text(&quot;I am Text&quot;),
    ],
    onPageChanged: (index) {
      print(&quot;page changed $index&quot;);
    },
  );
  </code></pre>
  <p>What I would like to do is I want to make the page changing animation after a swipe is done by user faster. This happens when a user does a swipe and lifts off the finger, PageView snaps to the next page. This snapping currently takes around so much time, provides bad UX. However, there is no option to set the snapping animation speed and duration.</p>
  <p>I have tried to add a listener:</p>
  <pre><code>_pageController.addListener(() {
        _pageController.position // this variable holds lots of information but yet I couldnt find what i looked for
        print(&quot;LISTENERRR ${_pageController.position}&quot;);
      }); 
  </code></pre>
  <p>Sadly, I couldnt find anything that can help me. I tried to overtake the swipe and make a custom swipe by calling</p>
  <pre><code>  _pageController.animateToPage(0, .. PARAMS);
  </code></pre>
  <p>for this to work, I need to detect when a page is about to change, so that I can overwrrite the animation with <code>animateToPage</code> method. Can I detect when a page is about to change in PageView? I am not interested in <code>onPageChanged</code> callback as it is late to overwrite the animation.</p>