ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
404 stars 99 forks source link

BlocBuilder getting error becuase of this widget. #290

Closed ilyasarafath closed 7 months ago

ilyasarafath commented 8 months ago

Version

3.0.0

Library

feedback_sentry

Flutter channel

stable

Flutter version

3.19.2

Platform

Android

Details

Inside an alert dialogue I placed a BlocBuilder , This block builder widget is not rendering because of BetterFeedBack. Screenshot_1711107772

Error: - Error: Could not find the correct Provider above this SupplierPopup Widget

This happens because you used a BuildContext that does not include the provider of your choice. There are a few common scenarios:

Steps to reproduce

  1. Create an alert dialogue .
  2. Wrap the content with any of the blocBuilder from flutter_bloc package
  3. call showDialog function and observe the result .

Output of flutter doctor -v

No response

ueman commented 8 months ago

So you have some code I can just copy paste and try? Even though your description is very detailed, it doesn't have enough information for me to be able to reproduce it.

ilyasarafath commented 8 months ago

Please check this sample app https://github.com/ilyasarafath/test-feedback

ilyasarafath commented 8 months ago

Also if alert dialogue is opened and try to click device back button the dialogue is still visible and page under dialogue is got popped . I updated the code in same above repository . Pease check

JesusHdez960717 commented 8 months ago

@ilyasarafath could you plz try to reproduce this bug with the latest changes in the branch of the PR #293, this brach

I have the hunch that it has to do with the same bug (i have not test it myself, sorry, don't have the time)

EM-Sabeel commented 8 months ago

@ueman @JesusHdez960717 I also facing this issue. The above issue not working. @ilyasarafath did find any solution

ilyasarafath commented 8 months ago

@JesusHdez960717 It is working fine

Screenshot 2024-04-03 at 2 33 35 PM
ilyasarafath commented 8 months ago

@ueman Can you merge this PR and add to feedback_sentry plugin ?

JesusHdez960717 commented 8 months ago

Hello @ilyasarafath, thanks for the round of testing on this issue.

Unfortunately, although the solution proposed in PR #293 resolves this issue and some others related to dialogs and navigation in general, it also generates some strange behavior.... such as in the case of using a dialog in the custom feedback , this is only displayed at the bottom...

Considering this, we are still looking for the best possible solution to the problem, a solution that solves the problem without generating these strange behaviors and even more so, avoids possible new errors in the future.

BTW, in the PR there are more details, examples and screenshots of what is happening

JesusHdez960717 commented 7 months ago

hi @ilyasarafath, the PR that solves this bug is finally merged, if you want test it again to make sure and in case the bug is not reproduced any more, feel free to close this issue

ilyasarafath commented 7 months ago

It is working fine in latest version 3.1.0 So closing this ticket - @JesusHdez960717