Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added clipBehavior property of PageView to TransformerPageView widget #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/transformer_page_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 clipBehavior;

/// Same as [PageView.physics]
final ScrollPhysics physics;

Expand Down Expand Up @@ -267,6 +272,7 @@ class TransformerPageView extends StatefulWidget {
this.transformer,
this.itemBuilder,
this.pageController,
this.clipBehavior,
@required this.itemCount,
}) : assert(itemCount != null),
assert(itemCount == 0 || itemBuilder != null || transformer != null),
Expand All @@ -283,6 +289,7 @@ class TransformerPageView extends StatefulWidget {
bool loop: false,
Axis scrollDirection = Axis.horizontal,
ScrollPhysics physics,
Clip clipBehavior,
bool pageSnapping = true,
ValueChanged<int> onPageChanged,
IndexController controller,
Expand All @@ -302,6 +309,7 @@ class TransformerPageView extends StatefulWidget {
index: index,
duration: duration,
curve: curve,
clipBehavior: clipBehavior,
viewportFraction: viewportFraction,
scrollDirection: scrollDirection,
physics: physics,
Expand Down Expand Up @@ -419,6 +427,7 @@ class _TransformerPageViewState extends State<TransformerPageView> {
onPageChanged: _onIndexChanged,
controller: _pageController,
scrollDirection: widget.scrollDirection,
clipBehavior: widget.clipBehavior,
physics: widget.physics,
pageSnapping: widget.pageSnapping,
reverse: _pageController.reverse,
Expand Down