A Flutter rate plugin.
dependencies:
rate_in_store: ^0.0.1
RateInStore.rate(iOSAppID: 'id2343214123', androidAppID: 'com.xxx.xxx');
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)
}
}
Use url_launch
launch('market://details?id=$appID');