Skip to content

Conversation

@Hari-07
Copy link
Contributor

@Hari-07 Hari-07 commented Feb 15, 2022

Added a parameter viewportFraction to make the viewportFraction of PageView used inside TabView customizable

Fixes #98506

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Feb 15, 2022
@Piinks Piinks self-requested a review February 23, 2022 13:44
@Piinks Piinks added the f: scrolling Viewports, list views, slivers, etc. label Feb 23, 2022
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hari-07 welcome! Thank you for the contribution.

_updateTabController();
_currentIndex = _controller!.index;
_pageController = PageController(initialPage: _currentIndex!);
_pageController = PageController(initialPage: _currentIndex!, viewportFraction: widget.viewportFraction);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style guide nit: more than one parameter should be split out over multiple lines

Suggested change
_pageController = PageController(initialPage: _currentIndex!, viewportFraction: widget.viewportFraction);
_pageController = PageController(
initialPage: _currentIndex!,
viewportFraction: widget.viewportFraction,
);

@Hari-07 Hari-07 requested a review from Piinks February 28, 2022 03:13
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter_LGTM
Thank you!

@jmagman
Copy link
Member

jmagman commented Mar 1, 2022

Google testing failures look like an unrelated flake. Manually marking as passing.

no such target '//testing/.../ios:IPHONE_8_PLUS_12_0': target 'IPHONE_8_PLUS_12_0' not declared in package

clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make viewport width adjustable for tabView

6 participants