rate_in_store 0.0.1

Flutter Android iOS

A flutter rate plugin.

rate_in_store #

A Flutter rate plugin.

How to use #

RateInStore.rate(iOSAppID: 'id2343214123', androidAppID: 'com.xxx.xxx');

On iOS #

if #available(iOS 10.3, *) {
    SKStoreReviewController.requestReview()
} else {
    guard let appID = call.arguments as? String else {
        print("appid cannot be null")
        return
    }
    
    var components = URLComponents(url: URL(string: "https://itunes.apple.com/app/\(appID)")!, resolvingAgainstBaseURL: false)
    components?.queryItems = [
        URLQueryItem(name: "action", value: "write-review")
    ]
    guard let writeReviewURL = components?.url else {
        return
    }
    
    if #available(iOS 10.0, *) {
        UIApplication.shared.open(writeReviewURL)
    } else {
        UIApplication.shared.openURL(writeReviewURL)
    }
}

On Android #

Use url_launch

launch('market://details?id=$appID');