Skip to content
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

How to clear feedback #14

Closed
jonmountjoy opened this issue Jul 12, 2020 · 3 comments
Closed

How to clear feedback #14

jonmountjoy opened this issue Jul 12, 2020 · 3 comments
Labels
enhancement New feature or request Hacktoberfest question Further information is requested

Comments

@jonmountjoy
Copy link

Hello,

How do I clear the feedback, so that the next time .show() is invoked, it doesn't show the old text and drawing? I saw no method at all to do this. It could perhaps be added as an optional argument to '.hide(mustClear: true)'.

PS. This is great, thank you!

@ueman ueman added enhancement New feature or request question Further information is requested labels Aug 23, 2020
@JayPerfetto
Copy link

I had to pull this code into my own project and adapt it in order to get this to work - its a pretty simple change, but it has not yet been implemented in the package.

In FeedbackWidget: Pass the Text Editing Controller and Paint Controller into the sendFeedback method

 onSubmit: (context, feedback) {
                        sendFeedback(
                          context,
                          FeedbackData.of(context).onFeedback,
                          screenshotController,
                          feedback,
                          painterController: painterController,
                          textEditingController: textEditingController,
                        );
                      }, 

Then in that function, clear those controllers after capturing the screenshot


        // Take high resolution screenshot
        final screenshot = await controller.capture(
          pixelRatio: 3,
          delay: const Duration(milliseconds: 0),
        );

        painterController.clear();
        textEditingController.clear();

@seanradford
Copy link

Another nicety might be a button to clear the contents of the text field. (Similar to the trash can to delete any annotations).

@ueman
Copy link
Owner

ueman commented Jan 12, 2021

This is fixed in this beta and thus also in the nullsafety prerelease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants