DoYouLoveUsDialog class

Dialog widget that handles the initial "Do you love us?" rating prompt.

This widget orchestrates the feedback flow by:

  • Showing a rating dialog to the user
  • Handling positive feedback with in-app review
  • Navigating to feedback collection for negative feedback
  • Managing "remind me later" functionality

The dialog integrates with the platform's native review system when users indicate they like the app, and provides a custom feedback collection flow for users who want to provide improvement suggestions.

Example:

DoYouLoveUsDialog(
  dialogBuilder: (context, onLike, onDislike, onRemindLater) {
    return YourCustomDialog(
      onLike: onLike,
      onDislike: onDislike,
      onRemindLater: onRemindLater,
    );
  },
  writeFeedbackPageBuilder: (context, isLoading, onSend) {
    return YourFeedbackForm(onSend: onSend);
  },
  onFinalSuccessCallback: (context) async {
    // Handle successful feedback submission
  },
)
Inheritance

Constructors

DoYouLoveUsDialog({Key? key, required WriteFeedbackPageBuilder writeFeedbackPageBuilder, required Future<void> onFinalSuccessCallback(BuildContext context)?, DialogBuilder? dialogBuilder, FeedbackUpdateCubit? feedbackUpdateCubit})
Creates a DoYouLoveUsDialog.
const

Properties

dialogBuilder DialogBuilder?
Builder function for creating the rating dialog UI. If null, a default dialog implementation will be used.
final
feedbackUpdateCubit FeedbackUpdateCubit?
Optional cubit for managing feedback update state. Used for handling "remind me later" functionality.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFinalSuccessCallback Future<void> Function(BuildContext context)?
Callback executed when feedback is successfully submitted. Can be used to show success dialogs or navigate to other screens.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
writeFeedbackPageBuilder WriteFeedbackPageBuilder
Builder function for creating the feedback collection page. This page is shown when users indicate they want to provide feedback.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<DoYouLoveUsDialog>
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, int wrapWidth = 65}) 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