BugReportPlugin class

A Flutter plugin for reporting bugs with image attachments.

This plugin provides a static method BugReportPlugin.bugReport that displays a view with a form to submit an error report. The form allows users to:

  • Add a comment (only required field)
  • Attach images (screenshots) - uploaded sequentially
  • Toggle "Would you like to be contacted?" and, if enabled, fields for email, phone, and name are displayed.

When submitting the form:

  1. A POST request is made to the configured URL sending the comment and contact information (if enabled) along with any attached images. The response is a JSON with { id: UUID }. The plugin includes error handling, action confirmation, and prevents exit while files are being uploaded.

Constructors

BugReportPlugin.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

bugReport(BuildContext context) → void
Static method to display the bug report view.
configure({required String host, required String collection, required String apiKey, required String package, Map<String, String>? textDictionary}) → void
Configures the plugin with the necessary parameters
getText(String key) String
Gets a text value from the dictionary or returns the default if not found

Constants

defaultTextDictionary → const Map<String, String>
Default text dictionary with English text