Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a Clarification for the docs of suggestionsBuilder of SearchAnchor#183106

Open
ahmedsameha1 wants to merge 1 commit intoflutter:masterfrom
ahmedsameha1:handle#183105
Open

Add a Clarification for the docs of suggestionsBuilder of SearchAnchor#183106
ahmedsameha1 wants to merge 1 commit intoflutter:masterfrom
ahmedsameha1:handle#183105

Conversation

@ahmedsameha1
Copy link
Contributor

This is my attempt to handle: #183105.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 2, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to clarify when the suggestionsBuilder is called. The added documentation is helpful but not entirely accurate. I've suggested a more precise wording to reflect that the builder is also called when the search view is first displayed, in addition to when the text changes.

final SearchAnchorChildBuilder builder;

/// Called to get the suggestion list for the search view.
/// It is called only when the search text changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This clarification is helpful, but not entirely accurate. The suggestionsBuilder is also called when the search view is first displayed (with an empty search text), not just when the text changes subsequently. A more precise phrasing would be better.

  /// It is called when the search view is shown, and again whenever the search text changes.

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. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant