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 custom selection indicators to the gallery scrollable tabs demo #15323

Merged
merged 1 commit into from Mar 12, 2018

Conversation

Projects
None yet
3 participants
@HansMuller
Copy link
Contributor

commented Mar 9, 2018

Pressing the smiley face turns on the custom tab selection indicators. There's a different indicator for each kind of tab label.

both

text_only

icons_only

As a second step (another PR), I will add an insets parameter to the ShapeBorder subclasses (like CircleBorder) and then simplify the code that constructs the custom indicators. For example:

new ShapeDecoration(
  shape: const CircleBorder(
    insets: const EdgeInsets.all(4.0),
    side: const BorderSide(
      color: Colors.white24,
      width: 4.0,
    ),
  ),

  // insets instead of adding:
  const CircleBorder(
    side: const BorderSide(
      color: Colors.transparent,
      width: 4.0,
    ),
  )

@googlebot googlebot added the cla: yes label Mar 9, 2018

@Hixie

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2018

I will add an insets parameter to the ShapeBorder subclasses

I'd recommend adding it to the BoxDecoration and ShapeDecoration classes instead.

@Hixie

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2018

LGTM

@HansMuller HansMuller merged commit 07eb5ea into flutter:master Mar 12, 2018

4 checks passed

cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
flutter-build

@HansMuller HansMuller deleted the HansMuller:gallery_tab_indicator branch Mar 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.