simple_feedback library
An in-app feedback dialog backed by Firebase (Firestore + Storage).
Quick start:
// after Firebase.initializeApp():
SimpleFeedback.configure(SimpleFeedbackConfig(
colors: FeedbackColors(primary: Color(0xFFFF8B45)),
));
// anywhere:
showSimpleFeedback(context, source: 'HomePage');
Classes
- FeedbackColors
- Optional color overrides for the feedback dialog.
- FeedbackDeviceId
- A random id persisted on the device, used to (loosely) attribute feedback submissions without requiring Firebase Auth.
- FeedbackImagePipeline
- Shrinks screenshot attachments to fit Firestore's 1 MiB document limit.
- FeedbackService
- Writes feedback documents to Firestore and screenshots to Storage.
- FeedbackStrings
- All user-visible strings of the feedback dialog.
- SimpleFeedback
- Entry point for configuring the package globally.
- SimpleFeedbackButton
- A ready-made feedback button that opens the feedback dialog on tap.
- SimpleFeedbackConfig
- Global configuration for SimpleFeedback.
Enums
- FeedbackEmailVisibility
- When the optional email input is shown in the feedback dialog.
- FeedbackImageStorage
- Where screenshot attachments end up.
- FeedbackType
- The kind of feedback a user is submitting.
Functions
-
captureBoundary(
GlobalKey< State< key, BuildContext context) → Future<StatefulWidget> >Uint8List?> -
Captures the RepaintBoundary behind
keyas PNG bytes. -
showSimpleFeedback(
BuildContext context, {required String source, String? userId, String? sourceData, Map< String, dynamic> ? metadata, GlobalKey<State< ? screenshotKey, SimpleFeedbackConfig? config}) → Future<StatefulWidget> >void> - Opens the feedback dialog.
Typedefs
Exceptions / Errors
- FeedbackImageTooLargeException
- Thrown when an image cannot be squeezed under the byte budget.
- FeedbackUploadException
- Thrown when any screenshot upload fails; the whole submission is aborted so no feedback document ends up with missing images.