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 option to disable [NavigationDestination]s ([NavigationBar] destination widget) #132361

Conversation

matheus-kirchesch
Copy link
Contributor

This PR adds a new option in the NavigationDestination api (the destination widget for the NavigationBar) allowing it to be disabled.

As the issue states this PR is the NavigationBar's version of these two PRs (#132349 and #127113)

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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 11, 2023
@HansMuller HansMuller self-requested a review August 11, 2023 21:44
@matheus-kirchesch
Copy link
Contributor Author

bump

@matheus-kirchesch
Copy link
Contributor Author

Bump v2.0

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

The disabled state should be included with the set passed to the MaterialStateProperty values we're resolving and the defaults for the disabled state should be part of the default theme, rather than handled as a special case.

@matheus-kirchesch
Copy link
Contributor Author

You are right, I have learned how the Material States works only after this PR, code updated

@HansMuller
Copy link
Contributor

It looks like the presubmit tests need your attention.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

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

LGTM! Also just some nits
Thanks a lot for the contribution:)

packages/flutter/lib/src/material/navigation_bar.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/navigation_bar.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/navigation_bar.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/navigation_bar.dart Outdated Show resolved Hide resolved
@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 22, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 22, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 22, 2023

auto label is removed for flutter/flutter/132361, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@QuncCccccc
Copy link
Contributor

Could you please rebase master to trigger Google testing again? Somehow in Google testing, some tests are broken but I don't think it is related to this change:)

@matheus-kirchesch matheus-kirchesch force-pushed the feature/disable_navigation_bar_destination branch from 719f1b6 to 5ad6a2c Compare September 25, 2023 23:33
@CaseyHillers CaseyHillers added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 28, 2023
@auto-submit auto-submit bot merged commit 9fdb167 into flutter:master Sep 28, 2023
67 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 29, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Sep 29, 2023
Roll Flutter from ff4a0f676f41 to 57b5c3cda000 (47 revisions)

flutter/flutter@ff4a0f6...57b5c3c

2023-09-29 [email protected] Roll Packages from c070b0a to d0e9a0e (5 revisions) (flutter/flutter#135753)
2023-09-29 [email protected] Roll Flutter Engine from db4d3b5b3f59 to c52251a8b2d0 (1 revision) (flutter/flutter#135748)
2023-09-29 [email protected] Roll Flutter Engine from 8b4e633c65eb to db4d3b5b3f59 (2 revisions) (flutter/flutter#135745)
2023-09-29 [email protected] Roll Flutter Engine from 09130bf5be97 to 8b4e633c65eb (1 revision) (flutter/flutter#135744)
2023-09-29 [email protected] Roll Flutter Engine from ccb30585d3f3 to 09130bf5be97 (1 revision) (flutter/flutter#135741)
2023-09-29 [email protected] Roll Flutter Engine from 2052515c44f3 to ccb30585d3f3 (1 revision) (flutter/flutter#135737)
2023-09-29 [email protected] Update localizations. (flutter/flutter#135691)
2023-09-29 [email protected] Roll Flutter Engine from 485543c6765a to 2052515c44f3 (4 revisions) (flutter/flutter#135732)
2023-09-29 54558023 [email protected] Add arch property for windows_arm64 platform (flutter/flutter#135725)
2023-09-29 [email protected] [flutter_tools] remove VmService screenshot for native devices. (flutter/flutter#135462)
2023-09-29 [email protected] Pin leak_tracker before publishing breaking change. (flutter/flutter#135720)
2023-09-28 [email protected] Roll Flutter Engine from cc7c3c1f0f41 to 485543c6765a (8 revisions) (flutter/flutter#135717)
2023-09-28 [email protected] Remove assertions on getOffsetToReveal (flutter/flutter#135634)
2023-09-28 [email protected] Marks Linux_android flutter_gallery__start_up_delayed to be unflaky (flutter/flutter#135565)
2023-09-28 [email protected] Roll Flutter Engine from dbb60932a6ab to cc7c3c1f0f41 (2 revisions) (flutter/flutter#135701)
2023-09-28 [email protected] [tool] fallback to sigkill when closing Chromium (flutter/flutter#135521)
2023-09-28 137456488 [email protected] Roll pub packages (flutter/flutter#135455)
2023-09-28 [email protected] Roll Flutter Engine from 9789dbc2ec3f to dbb60932a6ab (2 revisions) (flutter/flutter#135694)
2023-09-28 [email protected] Fix TabBarView.viewportFraction change is ignored (flutter/flutter#135590)
2023-09-28 [email protected] Roll Flutter Engine from d9eaebd05851 to 9789dbc2ec3f (2 revisions) (flutter/flutter#135688)
2023-09-28 [email protected] Added option to disable [NavigationDestination]s ([NavigationBar] destination widget) (flutter/flutter#132361)
2023-09-28 98614782 auto-submit[bot]@users.noreply.github.com Reverts "Marks Windows module_custom_host_app_name_test to be unflaky" (flutter/flutter#135692)
2023-09-28 [email protected] ð��� Add more fields to `RefreshProgressIndicator` (flutter/flutter#135207)
2023-09-28 [email protected] Roll Flutter Engine from 82b69dadc07a to d9eaebd05851 (1 revision) (flutter/flutter#135679)
2023-09-28 [email protected] Add API to read flavor from framework at run time (flutter/flutter#134179)
2023-09-28 [email protected] Marks Windows module_custom_host_app_name_test to be unflaky (flutter/flutter#135567)
2023-09-28 [email protected] [web] fix: do not call onSubmitted of TextField when switching browser tabs on mobile web (flutter/flutter#134870)
2023-09-28 [email protected] Roll Packages from 21c2ebb to c070b0a (3 revisions) (flutter/flutter#135676)
2023-09-28 [email protected] Fix `RangeSlider` throws an exception in a `ListView` (flutter/flutter#135667)
2023-09-28 [email protected] Roll Flutter Engine from d09c2dbe2292 to 82b69dadc07a (2 revisions) (flutter/flutter#135675)
2023-09-28 [email protected] Roll Flutter Engine from 495955a3b5de to d09c2dbe2292 (1 revision) (flutter/flutter#135669)
2023-09-28 [email protected] Revert "Upload generated frame-request-pending stats" (flutter/flutter#135672)
2023-09-28 [email protected] Upload generated frame-request-pending stats (flutter/flutter#135645)
2023-09-28 [email protected] Roll Flutter Engine from 937bf0432214 to 495955a3b5de (1 revision) (flutter/flutter#135665)
2023-09-28 [email protected] Roll Flutter Engine from d2540d87fd96 to 937bf0432214 (1 revision) (flutter/flutter#135660)
2023-09-28 [email protected] Roll Flutter Engine from c47faed53afe to d2540d87fd96 (2 revisions) (flutter/flutter#135652)
2023-09-28 [email protected] Update `TextField.style` documentation for Material 3 (flutter/flutter#135556)
2023-09-28 [email protected] Roll Flutter Engine from 44aef2e61718 to c47faed53afe (1 revision) (flutter/flutter#135647)
2023-09-28 [email protected] Manual roll Flutter Engine from be32dcc9117a to 44aef2e61718 (4 revisions) (flutter/flutter#135646)
2023-09-28 [email protected] Manual roll Flutter Engine from f70f65f7a622 to be32dcc9117a (31 revisions) (flutter/flutter#135637)
2023-09-28 [email protected] Implement SelectionArea single click/tap gestures (flutter/flutter#132682)
2023-09-27 [email protected] Support ensureVisible/showOnScreen/showInViewport for 2D Scrolling (flutter/flutter#135182)
2023-09-27 [email protected] made top level if checks gaurd clauses (flutter/flutter#135070)
2023-09-27 [email protected] Fix `SearchAnchor`'s search view isn't updated when the theme changes & widgets inside the search view do not inherit local themes (flutter/flutter#132749)
2023-09-27 [email protected] Config changes for linux coverage. (flutter/flutter#135604)
2023-09-27 [email protected] Roll Packages from 619af75 to 21c2ebb (6 revisions) (flutter/flutter#135602)
...
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…tination widget) (flutter#132361)

This PR adds a new option in the NavigationDestination api (the destination widget for the NavigationBar) allowing it to be disabled.

As the issue states this PR is the NavigationBar's version of these two PRs (flutter#132349 and flutter#127113)

* flutter#132359
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
HugoOlthof pushed a commit to moneybird/packages that referenced this pull request Dec 13, 2023
…r#5036)

Roll Flutter from ff4a0f676f41 to 57b5c3cda000 (47 revisions)

flutter/flutter@ff4a0f6...57b5c3c

2023-09-29 [email protected] Roll Packages from c070b0a to d0e9a0e (5 revisions) (flutter/flutter#135753)
2023-09-29 [email protected] Roll Flutter Engine from db4d3b5b3f59 to c52251a8b2d0 (1 revision) (flutter/flutter#135748)
2023-09-29 [email protected] Roll Flutter Engine from 8b4e633c65eb to db4d3b5b3f59 (2 revisions) (flutter/flutter#135745)
2023-09-29 [email protected] Roll Flutter Engine from 09130bf5be97 to 8b4e633c65eb (1 revision) (flutter/flutter#135744)
2023-09-29 [email protected] Roll Flutter Engine from ccb30585d3f3 to 09130bf5be97 (1 revision) (flutter/flutter#135741)
2023-09-29 [email protected] Roll Flutter Engine from 2052515c44f3 to ccb30585d3f3 (1 revision) (flutter/flutter#135737)
2023-09-29 [email protected] Update localizations. (flutter/flutter#135691)
2023-09-29 [email protected] Roll Flutter Engine from 485543c6765a to 2052515c44f3 (4 revisions) (flutter/flutter#135732)
2023-09-29 54558023 [email protected] Add arch property for windows_arm64 platform (flutter/flutter#135725)
2023-09-29 [email protected] [flutter_tools] remove VmService screenshot for native devices. (flutter/flutter#135462)
2023-09-29 [email protected] Pin leak_tracker before publishing breaking change. (flutter/flutter#135720)
2023-09-28 [email protected] Roll Flutter Engine from cc7c3c1f0f41 to 485543c6765a (8 revisions) (flutter/flutter#135717)
2023-09-28 [email protected] Remove assertions on getOffsetToReveal (flutter/flutter#135634)
2023-09-28 [email protected] Marks Linux_android flutter_gallery__start_up_delayed to be unflaky (flutter/flutter#135565)
2023-09-28 [email protected] Roll Flutter Engine from dbb60932a6ab to cc7c3c1f0f41 (2 revisions) (flutter/flutter#135701)
2023-09-28 [email protected] [tool] fallback to sigkill when closing Chromium (flutter/flutter#135521)
2023-09-28 137456488 [email protected] Roll pub packages (flutter/flutter#135455)
2023-09-28 [email protected] Roll Flutter Engine from 9789dbc2ec3f to dbb60932a6ab (2 revisions) (flutter/flutter#135694)
2023-09-28 [email protected] Fix TabBarView.viewportFraction change is ignored (flutter/flutter#135590)
2023-09-28 [email protected] Roll Flutter Engine from d9eaebd05851 to 9789dbc2ec3f (2 revisions) (flutter/flutter#135688)
2023-09-28 [email protected] Added option to disable [NavigationDestination]s ([NavigationBar] destination widget) (flutter/flutter#132361)
2023-09-28 98614782 auto-submit[bot]@users.noreply.github.com Reverts "Marks Windows module_custom_host_app_name_test to be unflaky" (flutter/flutter#135692)
2023-09-28 [email protected] ð��� Add more fields to `RefreshProgressIndicator` (flutter/flutter#135207)
2023-09-28 [email protected] Roll Flutter Engine from 82b69dadc07a to d9eaebd05851 (1 revision) (flutter/flutter#135679)
2023-09-28 [email protected] Add API to read flavor from framework at run time (flutter/flutter#134179)
2023-09-28 [email protected] Marks Windows module_custom_host_app_name_test to be unflaky (flutter/flutter#135567)
2023-09-28 [email protected] [web] fix: do not call onSubmitted of TextField when switching browser tabs on mobile web (flutter/flutter#134870)
2023-09-28 [email protected] Roll Packages from 21c2ebb to c070b0a (3 revisions) (flutter/flutter#135676)
2023-09-28 [email protected] Fix `RangeSlider` throws an exception in a `ListView` (flutter/flutter#135667)
2023-09-28 [email protected] Roll Flutter Engine from d09c2dbe2292 to 82b69dadc07a (2 revisions) (flutter/flutter#135675)
2023-09-28 [email protected] Roll Flutter Engine from 495955a3b5de to d09c2dbe2292 (1 revision) (flutter/flutter#135669)
2023-09-28 [email protected] Revert "Upload generated frame-request-pending stats" (flutter/flutter#135672)
2023-09-28 [email protected] Upload generated frame-request-pending stats (flutter/flutter#135645)
2023-09-28 [email protected] Roll Flutter Engine from 937bf0432214 to 495955a3b5de (1 revision) (flutter/flutter#135665)
2023-09-28 [email protected] Roll Flutter Engine from d2540d87fd96 to 937bf0432214 (1 revision) (flutter/flutter#135660)
2023-09-28 [email protected] Roll Flutter Engine from c47faed53afe to d2540d87fd96 (2 revisions) (flutter/flutter#135652)
2023-09-28 [email protected] Update `TextField.style` documentation for Material 3 (flutter/flutter#135556)
2023-09-28 [email protected] Roll Flutter Engine from 44aef2e61718 to c47faed53afe (1 revision) (flutter/flutter#135647)
2023-09-28 [email protected] Manual roll Flutter Engine from be32dcc9117a to 44aef2e61718 (4 revisions) (flutter/flutter#135646)
2023-09-28 [email protected] Manual roll Flutter Engine from f70f65f7a622 to be32dcc9117a (31 revisions) (flutter/flutter#135637)
2023-09-28 [email protected] Implement SelectionArea single click/tap gestures (flutter/flutter#132682)
2023-09-27 [email protected] Support ensureVisible/showOnScreen/showInViewport for 2D Scrolling (flutter/flutter#135182)
2023-09-27 [email protected] made top level if checks gaurd clauses (flutter/flutter#135070)
2023-09-27 [email protected] Fix `SearchAnchor`'s search view isn't updated when the theme changes & widgets inside the search view do not inherit local themes (flutter/flutter#132749)
2023-09-27 [email protected] Config changes for linux coverage. (flutter/flutter#135604)
2023-09-27 [email protected] Roll Packages from 619af75 to 21c2ebb (6 revisions) (flutter/flutter#135602)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants