From 55a1c3d6779959a20f2f8741127f545ba77f9759 Mon Sep 17 00:00:00 2001 From: Scopewriter <> Date: Wed, 11 Sep 2019 09:07:57 +0200 Subject: [PATCH] Added the underlying pageController to the TransformInfo. --- lib/transformer_page_view.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/transformer_page_view.dart b/lib/transformer_page_view.dart index f4bc33f..6be02a3 100644 --- a/lib/transformer_page_view.dart +++ b/lib/transformer_page_view.dart @@ -58,6 +58,9 @@ class TransformInfo { /// Copy from [TransformerPageView.scrollDirection] final Axis scrollDirection; + /// The `pageController` of the `TransformerPageView` + final TransformerPageController pageController; + TransformInfo( {this.index, this.position, @@ -68,7 +71,8 @@ class TransformInfo { this.forward, this.done, this.viewportFraction, - this.scrollDirection}); + this.scrollDirection, + this.pageController}); } abstract class PageTransformer { @@ -394,7 +398,8 @@ class _TransformerPageViewState extends State { forward: _pageController.position.pixels - _currentPixels >= 0, done: _done, scrollDirection: widget.scrollDirection, - viewportFraction: widget.viewportFraction); + viewportFraction: widget.viewportFraction, + pageController: _pageController); return _transformer.transform(child, info); }); }