Skip to content

added enabled to search anchor - #153256

Merged
auto-submit[bot] merged 15 commits into
flutter:masterfrom
Macacoazul01:origem
Sep 4, 2024
Merged

auto-submit[bot] merged 15 commits into
flutter:masterfrom
Macacoazul01:origem

Conversation

@Macacoazul01

Copy link
Copy Markdown
Contributor

Added the same parameter from #137388 to the SearchAnchor

This PR will fix: #150331

Pre-launch Checklist

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

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels Aug 12, 2024
@Piinks
Piinks requested a review from QuncCccccc August 14, 2024 18:30

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM:) Thanks for the contribution!

Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/lib/src/material/search_anchor.dart Outdated

@Renzo-Olivares Renzo-Olivares left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, w/ small nit. Thanks for the contribution!

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe it's kind of not ideal that you'll have to pass enabled: false to both SearchBar and SearchAnchor, but I guess that's the best we can do with that builder approach. So I think this approach looks good, just some small code and docs comments. Thanks for the PR!

Comment thread packages/flutter/lib/src/material/search_anchor.dart Outdated
Comment thread packages/flutter/lib/src/material/search_anchor.dart
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart Outdated
Comment thread packages/flutter/lib/src/material/search_anchor.dart
@Macacoazul01

Copy link
Copy Markdown
Contributor Author

@justinmc the only viable option that i found was with

expect(searchBarFinder.hitTestable().tryEvaluate(), false);

When enabled: false, searchBarFinder.hitTestable().tryEvaluate() returns false

When enabled: true, searchBarFinder.hitTestable().tryEvaluate() returns true

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

Take a look at getOpacity though, I think it can be private.

Comment thread packages/flutter/lib/src/material/search_anchor.dart Outdated
Comment thread packages/flutter/test/material/search_anchor_test.dart
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 4, 2024
@auto-submit
auto-submit Bot merged commit ce15e3b into flutter:master Sep 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
@Macacoazul01
Macacoazul01 deleted the origem branch December 27, 2024 00:19
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 framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchBar open search view on tap when enabled option in the SearchBar is set to false

5 participants