feedback_response 0.0.1 copy "feedback_response: ^0.0.1" to clipboard
feedback_response: ^0.0.1 copied to clipboard

A simple package that aims to provide a complete solution for communication between services inside your app.

This package aims to provide a complete solution for communication between services inside your app. The idea behind this class is that every service (provided you use services - or you may call them repositories, controllers, robots or whatever) uses the same class as a form of communication. This solves a couple problems you did not knew you had!

https://media.giphy.com/media/g0jlZ04SeV4AM1lvFw/giphy.gif

  • Whenever a service in a chain of service methods results in an error type of FeedbackResponse, then all the other services/methods have to do is recognise the error FeedbackResponse and pass that response down the line to the calling class.
  • Here comes the cool part, the response contains a proper and specific feedback title and message for the user along with the type of feedback the user should get (if that’s what you want of course, they may also be empty). Example: fetching a user’s profile goes wrong. A ProfileServiceRobot creates a FeedbackResponse with a title and message explaining what happened in context of the profile along with the type of feedback it should show (snackbar, dialog, bottomsheet, none). Now all you have to is handle that accordingly (whether it be an error or success, both may contain interesting feedback) and your users are instantly provided with super responsive feedback everywhere they go!
  • Here comes the last cool part if you create/override your own FeedbackResponseHandlerInterface then all you have to do is pass any response to the handler and it will automatically handle the responses for you (coool, more time for you to write sick code).
1
likes
0
pub points
58%
popularity

Publisher

verified publishercodaveto.com

A simple package that aims to provide a complete solution for communication between services inside your app.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on feedback_response