ueman / feedback

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

Provide an onClose callback #195

Open mrgzi opened 2 years ago

mrgzi commented 2 years ago

Banner bottom ads cover the send button, therefore we have to hide the banner before we show feedback. But there is another issue that appears, we don't know if the user canceled the feedback. In this case, we should provide an onClose callback function.

ueman commented 2 years ago

Can you provide example code? Without more information I can't do anything about it. Also please use the issue template.

mrgzi commented 2 years ago

If you show the banner in any network, you can see that the banner stays above the feedback widget.

Screen Shot 2022-04-18 at 01 27 32
caseycrogers commented 2 years ago

How are you displaying your banner ad? I'm not getting this issue using https://pub.dev/packages/google_mobile_ads

buchen commented 1 year ago

Adding another use case:

In my app, I am showing financial information. Therefore I am giving the user an option to hide the monetary values. If the user exists the feedback mode, I want to revert back to the previous viewing mode. I can revert back during onSubmit, but I have no chance to revert back when the user cancels the feedback.

buchen commented 1 year ago

And for other looking for this - maybe listening on the changeNotifier could work for you

final betterFeedback = BetterFeedback.of(context);
void listener() => print('status is ${betterFeedback.isVisible}');
betterFeedback.addListener(listener);