daybook_feedback 0.1.1
daybook_feedback: ^0.1.1 copied to clipboard
In-app feedback for Flutter: shake, screenshot, a button or a two-finger long press opens a composer with a screenshot you can pin. Only for people approved in Daybook.
daybook_feedback #
In-app feedback for Flutter, from Daybook. Somebody shakes the phone, takes a screenshot, taps a small button or holds two fingers on the screen, and gets a composer with a picture of what they were looking at. They tap the thing that is wrong to pin it, say what happened, and send. It arrives in Daybook with the screen they were on, how they got there, their device and the app version.
It does nothing for anybody you have not approved. That is the point of the setup below.
Setup #
-
In Daybook, open the project's Widget setup, create a key and choose Flutter.
-
Add the package:
dependencies: daybook_feedback: ^0.1.0 -
Start it, wrap the app, and say who is signed in:
Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); await DaybookFeedback.init(ingestKey: 'pmi_...'); runApp(DaybookFeedback.wrap(const MyApp())); } // Wherever you know who is signed in: await DaybookFeedback.identify( FeedbackIdentity(externalId: user.id, email: user.email, name: user.name), ); // And on sign-out: DaybookFeedback.reset(); -
Optionally, add
DaybookFeedback.navigatorObserverto yourMaterialApp.navigatorObservers, so reports say which screen they came from and how the person got there.
Who gets it #
Nobody, until you say so. The first time a person you identified starts the app, they appear in the project's Reporters queue as a request, with their device and app version. Until someone approves them:
- there is no button, no gesture listener, no shake sensor and no screenshot listener;
DaybookFeedback.open()returnsfalse;- nothing can be filed with the key.
This is enforced by Daybook's server, not by the SDK: a Flutter key refuses anonymous use and anybody not approved by a person, whatever the project's reporter policy. Approve them, and the next app start turns on exactly the triggers the key allows. Block them, and it all goes again.
Triggers #
Set per key in Daybook, and picked up on the next app start. Any combination, but at least one:
| Trigger | Notes |
|---|---|
| Shake | Several hard jolts close together; putting the phone down does not count. |
| Screenshot | A system screenshot opens the composer. iOS, and Android 14 and later. Turn it off if your app already does something on screenshot, such as sharing. |
| Floating button | A small button, bottom-right; drag it out of the way for as long as a report takes. |
| Two-finger long press | Two fingers held still. Collides with almost nothing. |
A trigger that is off is never registered, so it cannot collide with your app. Whatever is on, you can also open the composer from your own code:
DaybookFeedback.open(); // false when this person is not approved
What it takes, and what it does not #
- The screenshot is the app drawing its own frame: no photo-library or screen-recording permission.
- Android 14+'s screenshot callback uses
DETECT_SCREEN_CAPTURE, a normal permission granted at install, never a prompt. On older Android the screenshot trigger simply does not fire. - A pin records the text of what was tapped and the nearest
ValueKey<String>above it — give the widgets you care about a key, and reports will name them. - Offline, a report waits (without its screenshot) and goes on the next start.
Running the example #
cd example
flutter run --dart-define=DAYBOOK_KEY=pmi_... --dart-define=DAYBOOK_EMAIL=you@example.com
Approve yourself in Reporters, restart, and shake.