shareApp static method

void shareApp(
  1. String isoAppID,
  2. BuildContext context, {
  3. String message = "",
})

Implementation

static void shareApp(String isoAppID, BuildContext context,
    {String message = ""}) async {
  if (message == "") {
    message = "amazingapp".tr;
  }
  String appLink = 'https://apps.apple.com/app/id$isoAppID';
  if (isAndroid) {
    var packageName = await Helper.getPackageName();

    appLink = "https://play.google.com/store/apps/details?id=$packageName";
  }

  Share.share('$message $appLink',
      sharePositionOrigin: _getSharePos(context));
}