launchRequestReview method

Future<bool> launchRequestReview({
  1. bool onlyNative = false,
})

launches a 'requestReview' dialog on iOS. If not available launches store URL externally.

If onlyNative is true, will do nothing if the native dialog is not available. (e.g. on android).

Implementation

Future<bool> launchRequestReview({bool onlyNative = false}) async {
  if (Platform.isIOS) {
    if (await _invokeRequestReview()) {
      if (onlyNative) {
        return false;
      }
      return await launchStoreListing(iosWriteReview: true);
    }
    return true;
  } else {
    if (onlyNative) {
      return false;
    }
    return await launchStoreListing();
  }
}