Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

SearchBar should be a StatefulWidget #28

Open
ArcticZeroo opened this issue Oct 11, 2018 · 0 comments
Open

SearchBar should be a StatefulWidget #28

ArcticZeroo opened this issue Oct 11, 2018 · 0 comments
Labels

Comments

@ArcticZeroo
Copy link
Owner

There's no reason that SearchBar should not be a Widget, and furthermore passing setState and forcing the entire main Scaffold to rebuild is messy.

The SearchBar should be rewritten as a StatefulWidget. If we really want to avoid breaking, we could just make it a new class (SearchBarWidget).

It should take a Builder for building the AppBar. The getSearchAction method will be the only tricky bit.

Ideally we also support theming with Theme.of instead of hardcoded values, so that developers can wrap the widget in a Theme.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant