BetterFeedback class

A feedback widget that uses a custom widget and data type for prompting the user for their feedback. This widget should be the root of your widget tree. Specifically, it should be above any Navigator widgets, including the navigator provided by MaterialApp.

For example like this

BetterFeedback(
  child: MaterialApp(
  title: 'App',
  home: MyHomePage(),
);
Inheritance

Constructors

BetterFeedback({Key? key, required Widget child, FeedbackBuilder? feedbackBuilder, ThemeMode? themeMode, FeedbackThemeData? theme, FeedbackThemeData? darkTheme, List<LocalizationsDelegate>? localizationsDelegates, Locale? localeOverride, FeedbackMode mode = FeedbackMode.draw, double pixelRatio = 3.0})
Creates a BetterFeedback.
const

Properties

child Widget
The application to wrap, typically a MaterialApp.
final
darkTheme FeedbackThemeData?
The theme, which gets used to style the feedback ui if the themeMode is ThemeMode.dark or user's system preference is dark.
final
feedbackBuilder FeedbackBuilder?
Returns a widget that prompts the user for feedback and calls the provided submit function with their completed feedback. Typically, this involves some form fields and a submit button that calls OnSubmit when pressed. Defaults to StringFeedback which uses a single editable text field to prompt for input.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
localeOverride Locale?
Can be used to set the locale. If it is not set, the platform default locale is used. If no platform default locale exists, english is used.
final
localizationsDelegates List<LocalizationsDelegate>?
The delegates for this library's FeedbackLocalization widget. You need to supply the following delegates if you choose to customize it. MaterialLocalizations CupertinoLocalizations WidgetsLocalizations an instance of LocalizationsDelegate<FeedbackLocalizations>
final
mode FeedbackMode
Set the default mode when launching feedback. By default it will allow the user to navigate. See FeedbackMode for other options.
final
pixelRatio double
The pixelRatio describes the scale between the logical pixels and the size of the output image. Specifying 1.0 will give you a 1:1 mapping between logical pixels and the output pixels in the image. The default is a pixel ration of 3 and a value below 1 is not recommended.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme FeedbackThemeData?
The Theme, which gets used to style the feedback ui if the themeMode is ThemeMode.light or user's system preference is light.
final
themeMode ThemeMode?
Determines which theme will be used by the Feedback UI. If set to ThemeMode.system, the choice of which theme to use will be based on the user's system preferences (using the MediaQuery.platformBrightnessOf). If set to ThemeMode.light the theme will be used, regardless of the user's system preference. If theme isn't provided FeedbackThemeData will be used. If set to ThemeMode.dark the darkTheme will be used regardless of the user's system preference. If darkTheme isn't provided, will fallback to theme. If both darkTheme and theme aren't provided FeedbackThemeData.dark will be used. The default value is ThemeMode.system.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BetterFeedback>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

of(BuildContext context) FeedbackController
Call BetterFeedback.of(context) to get an instance of FeedbackData on which you can call .show() or .hide() to enable or disable the feedback view.