in_app_feedback_rating 0.0.2 copy "in_app_feedback_rating: ^0.0.2" to clipboard
in_app_feedback_rating: ^0.0.2 copied to clipboard

A Flutter package to collect in-app feedback and ratings using emojis.

TODO: A Flutter package to collect in-app feedback and ratings using emojis.

Features #

TODO: in-app feedback and ratings using emojis

Getting started #

TODO: in-app feedback and ratings using emojis

Usage #

TODO: Use in_app-feedback_rating with your needed contains.

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final GlobalKey<ScaffoldMessengerState> _messengerKey =
  GlobalKey<ScaffoldMessengerState>();

  RxString ratingValue = "".obs;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      scaffoldMessengerKey: _messengerKey,
      home: Scaffold(
        appBar: AppBar(title: Text("In-App Feedback Test")),
        body: Center(
          child: Column(
            children: [
              InAppFeedbackRating(
                // feedbackHint: "Enter Feedback Here",
                // ratingHint: "Rating Here",
                submitButtonText: "Submit",
                onRatingSubmitted: (rating) {
                  print("Rating: $rating");

                  ratingValue.value = rating.toString();
                },
                onFeedbackSubmitted: (feedback) {
                  print("Feedback: $feedback");
                },
                onFeedbackRatingSubmitted: () {
                  print("Feedback and Rating Submitted!");

                  // Show SnackBar using the global key
                  _messengerKey.currentState?.showSnackBar(
                    SnackBar(
                      content: Text('Rating ${ratingValue.value} submitted!'),
                    ),
                  );
                  // Show a SnackBar when the button is pressed
                  /*    ScaffoldMessenger.of(context).showSnackBar(
                    SnackBar(
                      content: Text('Feedback and Rating submitted!'),
                      duration: Duration(seconds: 2),
                      // Duration of the SnackBar
                      backgroundColor: Colors.blue,
                      // Background color of SnackBar
                      action: SnackBarAction(
                        label: 'UNDO',
                        onPressed: () {
                          // Handle the action, like undoing the change
                          print('Undo action');
                        },
                      ),
                    ),
                  );*/
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
105
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to collect in-app feedback and ratings using emojis.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_rating_bar

More

Packages that depend on in_app_feedback_rating