fluttercommunity / app_review

App Review - Request and Write Reviews and Open Store Listing for Android and iOS in Flutter. Maintainer: @rodydavis
https://fluttercommunity.github.io/app_review/
MIT License
329 stars 109 forks source link

Use method instead of getters #19

Closed aloisdeniel closed 3 years ago

aloisdeniel commented 4 years ago

I would preferably used methods for instead of getters that returns a new Future.

I find it more clear that an action is triggered by calling a method in a fire and forget case. At first I thought that there were a cache of the Future.

AppReview.storeListing; // I would find `AppReview.storeListing()` more transparent on the fact that a processing is potentially triggered.
rodydavis commented 4 years ago

Yes i will refactor on a future update!

shinsenter commented 3 years ago

@aloisdeniel This may be resolved with No #38.

tzachov commented 3 years ago

As far as I see this issue was not resolved. I agree with @aloisdeniel - getters for Futures feels unnatural.

I think all of these getters should be methods:

AppReview.isRequestReviewAvailable
AppReview.requestReview
AppReview.writeReview
AppReview.storeListing
AppReview.getAppID
AppReview.getiOSAppID
rodydavis commented 3 years ago

I'm open for PRs!