toStore static method

Future<bool> toStore({
  1. String? appId,
})

Implementation

static Future<bool> toStore({String? appId}) async {
  if (Platform.isIOS && appId == null) {
    return false;
  }
  var target = Platform.isAndroid ? "market://details?id=${(await packageInfo).packageName}" : "itms-apps://itunes.apple.com/app/id$appId";
  try {
    return launch(target);
  } catch (e) {
    print(e);
  }
  return false;
}