pass ScreenshotController to feedbackBuilder #376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
ScreenshotController?parameter as the fourth argument to theFeedbackBuildertypedef so custom feedback forms can receive the overlay’s internalScreenshotControllerinstance and callcapture(...)directly.screenshotControllerinstance fromFeedbackWidgetdown toFeedbackBottomSheetand then into thefeedbackBuilder.simpleFeedbackBuilder/StringFeedbacksignatures to accept the new nullable parameter to avoid compile errors.CustomFeedbackFormthat demonstrates capturing, previewing, retaking, and attaching screenshot bytes toextras.💡 Motivation and Context
ScreenshotControllerinstances caused race conditions or captured the wrong render boundary.ScreenshotControllerinstance used by the overlay so custom forms can safely callawait screenshotController?.capture(...)and obtain the correct screenshot bytes.extraswithout changing default behavior or breaking existing integrations.💚 How did you test it?
Performed a static code review to ensure null-safety and correct propagation of the controller.
Recommended manual test steps for reviewers / QA:
StringFeedback) and verify feedback submission still works unchanged.ScreenshotController?parameter; open the feedback sheet, tap “Take screenshot”, and verifycapture()returns non-null bytes after the sheet is visible.extrason submit contains the'screenshot'key with image bytes when used in the example form.flutter analyzeandflutter formatto ensure code quality and style.Note: No automated widget/unit tests are included in this change (see next steps).
📝 Checklist
🔮 Next steps
feedbackBuildersignature and show aCustomFeedbackFormexample demonstrating capturing and attaching screenshots.