goToAppStore function

Future goToAppStore(
  1. BuildContext context,
  2. AppInfo info
)

Implementation

Future goToAppStore(BuildContext context, AppInfo info) async {
  final url = info.appStoreUrl;
  if (url != null) {
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  } else {
    Navigator.pop(context);
  }
}