-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Will you implement showSearch? #28
Comments
In the last version I implemented the context of the current BuildContext. You can access the context of the last build method with Get.context. This will work for 99% of things, but it won't work for everything, InheritedWidget is the only problem in that regard, I don't know what you're trying to do, but unless you are looking for an InheritedWidget context, everything will work normally, as it takes the context of the Screen that is currently open. Try Get.context and let me know if it works for you. |
Just tested it and it didn't work. Here is the code if you want to have a look.
|
Everything I saw on this page is about widgets. You cannot use the Get.context within widgets. Get was designed to be 100% stable, and cases like these that generate side effects, an exception will be thrown. As much as you are building widgets in a functional way, the real return is still from a widget, and it has the same behavior as the widget code _buildAddressTile(){} for example, was in the tree. |
Ah ok, I understand now. Thanks for your help! |
I'm currently using your package to completely separate my UI from all the logic and I want to use the search delegate, but it needs the context to be called. Are you planning to implement this feature?
The text was updated successfully, but these errors were encountered: