From e7585d4ed953108cd2d54acaeb4278c01709b146 Mon Sep 17 00:00:00 2001 From: Taosif7 Date: Fri, 18 Dec 2020 23:15:35 +0530 Subject: [PATCH 1/2] Added clipBehavior property of PageView to TransformerPageView widget --- lib/transformer_page_view.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/transformer_page_view.dart b/lib/transformer_page_view.dart index f4bc33f..f175cc9 100644 --- a/lib/transformer_page_view.dart +++ b/lib/transformer_page_view.dart @@ -204,6 +204,11 @@ class TransformerPageView extends StatefulWidget { /// Defaults to [Axis.horizontal]. final Axis scrollDirection; + /// Same as [PageView.clipBehavior] + /// + /// Defaults to [Clip.hardEdge]. + final Clip clipBehaviour; + /// Same as [PageView.physics] final ScrollPhysics physics; @@ -267,6 +272,7 @@ class TransformerPageView extends StatefulWidget { this.transformer, this.itemBuilder, this.pageController, + this.clipBehaviour, @required this.itemCount, }) : assert(itemCount != null), assert(itemCount == 0 || itemBuilder != null || transformer != null), @@ -283,6 +289,7 @@ class TransformerPageView extends StatefulWidget { bool loop: false, Axis scrollDirection = Axis.horizontal, ScrollPhysics physics, + Clip clipBehavior, bool pageSnapping = true, ValueChanged onPageChanged, IndexController controller, @@ -302,6 +309,7 @@ class TransformerPageView extends StatefulWidget { index: index, duration: duration, curve: curve, + clipBehavior:clipBehavior, viewportFraction: viewportFraction, scrollDirection: scrollDirection, physics: physics, @@ -419,6 +427,7 @@ class _TransformerPageViewState extends State { onPageChanged: _onIndexChanged, controller: _pageController, scrollDirection: widget.scrollDirection, + clipBehavior: widget.clipBehaviour, physics: widget.physics, pageSnapping: widget.pageSnapping, reverse: _pageController.reverse, From 9f3a3abf79878aaaae18adb7379df2da938cbcc0 Mon Sep 17 00:00:00 2001 From: Taosif7 Date: Fri, 18 Dec 2020 23:30:20 +0530 Subject: [PATCH 2/2] Fixed a member variable name typo error --- lib/transformer_page_view.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/transformer_page_view.dart b/lib/transformer_page_view.dart index f175cc9..8e6328e 100644 --- a/lib/transformer_page_view.dart +++ b/lib/transformer_page_view.dart @@ -207,7 +207,7 @@ class TransformerPageView extends StatefulWidget { /// Same as [PageView.clipBehavior] /// /// Defaults to [Clip.hardEdge]. - final Clip clipBehaviour; + final Clip clipBehavior; /// Same as [PageView.physics] final ScrollPhysics physics; @@ -272,7 +272,7 @@ class TransformerPageView extends StatefulWidget { this.transformer, this.itemBuilder, this.pageController, - this.clipBehaviour, + this.clipBehavior, @required this.itemCount, }) : assert(itemCount != null), assert(itemCount == 0 || itemBuilder != null || transformer != null), @@ -309,7 +309,7 @@ class TransformerPageView extends StatefulWidget { index: index, duration: duration, curve: curve, - clipBehavior:clipBehavior, + clipBehavior: clipBehavior, viewportFraction: viewportFraction, scrollDirection: scrollDirection, physics: physics, @@ -427,7 +427,7 @@ class _TransformerPageViewState extends State { onPageChanged: _onIndexChanged, controller: _pageController, scrollDirection: widget.scrollDirection, - clipBehavior: widget.clipBehaviour, + clipBehavior: widget.clipBehavior, physics: widget.physics, pageSnapping: widget.pageSnapping, reverse: _pageController.reverse,