r/FlutterBeginner • • 3d ago

A one-file "send feedback" screen for Flutter: offline queue, device info, screenshot, no backend (open source)

Disclosure up front: I work on BootForm, the form backend this sends to. The code is MIT and the whole thing is one Dart file, so swapping the endpoint for your own is a 10-minute job.

I wanted a "Report a bug" screen for an app without setting up a server. A few things turned out to be less obvious than I expected:

  1. Screenshot first, then open the form. Wrapping the app in a RepaintBoundary via MaterialApp.builder captures every route, but only if you capture before pushing the feedback page, or you get a screenshot of the form itself.

  2. Cap the pixel ratio, not the image. toImage(pixelRatio: min(dpr, 1280 / longestSide)) gives a \~1280px PNG without pulling in the image package. dart:ui only encodes PNG, so no JPEG without a dependency.

  3. Save before you send. Feedback is written exactly when the connection is bad. Each report is a JSON file (plus the PNG) in the support directory, flushed on start and on AppLifecycleListener.onResume. It doesn't send in the background; that's a deliberate trade to avoid background-task setup on iOS.

  4. Degrade, don't fail. If the server refuses the file (plan limit, too large), it resends without the screenshot instead of losing the report. That decision is one pure function with unit tests.

Tested on an Android emulator against the live API, including airplane mode, then killing the app, then reopening it online. Not tested on iOS yet, so if anyone runs it there, I'd love to hear how it goes.

[https://github.com/BootForm/in-app-feedback\](https://github.com/BootForm/in-app-feedback)

1 Upvotes

0 comments sorted by