{"id":13552139,"url":"https://github.com/pichillilorenzo/flutter_appavailability","last_synced_at":"2025-06-14T11:40:13.788Z","repository":{"id":48607050,"uuid":"148467005","full_name":"pichillilorenzo/flutter_appavailability","owner":"pichillilorenzo","description":"A Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed apps.","archived":false,"fork":false,"pushed_at":"2023-01-31T11:01:32.000Z","size":143,"stargazers_count":92,"open_issues_count":24,"forks_count":90,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T19:15:18.738Z","etag":null,"topics":["android","dart","flutter","flutter-package","flutter-plugin","ios","plugin","swift"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/flutter_appavailability","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pichillilorenzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-12T11:05:40.000Z","updated_at":"2024-07-29T22:47:11.000Z","dependencies_parsed_at":"2023-02-16T18:32:27.878Z","dependency_job_id":null,"html_url":"https://github.com/pichillilorenzo/flutter_appavailability","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pichillilorenzo/flutter_appavailability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fflutter_appavailability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fflutter_appavailability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fflutter_appavailability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fflutter_appavailability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pichillilorenzo","download_url":"https://codeload.github.com/pichillilorenzo/flutter_appavailability/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fflutter_appavailability/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259810854,"owners_count":22915133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","dart","flutter","flutter-package","flutter-plugin","ios","plugin","swift"],"created_at":"2024-08-01T12:01:59.516Z","updated_at":"2025-06-14T11:40:13.737Z","avatar_url":"https://github.com/pichillilorenzo.png","language":"Dart","funding_links":[],"categories":["插件","Dart","Device [🔝](#readme)","Plugins"],"sub_categories":["设备","Device"],"readme":"# Flutter AppAvailability Plugin\n\n[![Pub](https://img.shields.io/pub/v/flutter_appavailability.svg)](https://pub.dartlang.org/packages/flutter_appavailability)\n\nA Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed apps.\n\nThis plugin was inspired by the plugin [AppAvailability for Cordova](https://github.com/ohh2ahh/AppAvailability).\n\n## Getting Started\nFor help getting started with Flutter, view our online\n[documentation](https://flutter.io/).\n\nFor help on editing plugin code, view the [documentation](https://flutter.io/developing-packages/#edit-plugin-package).\n\n## Installation\nFirst, add `flutter_appavailability` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).\n\n## Methods available\n- `checkAvailability(String uri)`\n- `getInstalledApps()` (only for **Android**)\n- `isAppEnabled(String uri)` (only for **Android**)\n- `launchApp(String uri)`\n\nSee the [docs](https://pub.dartlang.org/documentation/flutter_appavailability/latest/).\n\n## Example\nHere is a small example flutter app displaying a list of installed apps that you can launch.\n```dart\nimport 'package:flutter/material.dart';\nimport 'dart:async';\nimport 'dart:io';\n\nimport 'package:flutter_appavailability/flutter_appavailability.dart';\n\nvoid main() =\u003e runApp(new MyApp());\n\nclass MyApp extends StatefulWidget {\n  @override\n  _MyAppState createState() =\u003e new _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n\n  List\u003cMap\u003cString, String\u003e\u003e installedApps;\n  List\u003cMap\u003cString, String\u003e\u003e iOSApps = [\n    {\n      \"app_name\": \"Calendar\",\n      \"package_name\": \"calshow://\"\n    },\n    {\n      \"app_name\": \"Facebook\",\n      \"package_name\": \"fb://\"\n    },\n    {\n      \"app_name\": \"Whatsapp\",\n      \"package_name\": \"whatsapp://\"\n    }\n  ];\n\n\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  // Platform messages are asynchronous, so we initialize in an async method.\n  Future\u003cvoid\u003e getApps() async {\n    List\u003cMap\u003cString, String\u003e\u003e _installedApps;\n\n    if (Platform.isAndroid) {\n\n      _installedApps = await AppAvailability.getInstalledApps();\n\n      print(await AppAvailability.checkAvailability(\"com.android.chrome\"));\n      // Returns: Map\u003cString, String\u003e{app_name: Chrome, package_name: com.android.chrome, versionCode: null, version_name: 55.0.2883.91}\n\n      print(await AppAvailability.isAppEnabled(\"com.android.chrome\"));\n      // Returns: true\n\n    }\n    else if (Platform.isIOS) {\n      // iOS doesn't allow to get installed apps.\n      _installedApps = iOSApps;\n\n      print(await AppAvailability.checkAvailability(\"calshow://\"));\n      // Returns: Map\u003cString, String\u003e{app_name: , package_name: calshow://, versionCode: , version_name: }\n\n    }\n\n    setState(() {\n      installedApps = _installedApps;\n    });\n\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (installedApps == null)\n      getApps();\n\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(\n          title: const Text('Plugin flutter_appavailability app'),\n        ),\n        body: ListView.builder(\n          itemCount: installedApps == null ? 0 : installedApps.length,\n          itemBuilder: (context, index) {\n            return ListTile(\n              title: Text(installedApps[index][\"app_name\"]),\n              trailing: IconButton(\n                icon: const Icon(Icons.open_in_new),\n                onPressed: () {\n                  Scaffold.of(context).hideCurrentSnackBar();\n                  AppAvailability.launchApp(installedApps[index][\"package_name\"]).then((_) {\n                    print(\"App ${installedApps[index][\"app_name\"]} launched!\");\n                  }).catchError((err) {\n                    Scaffold.of(context).showSnackBar(SnackBar(\n                        content: Text(\"App ${installedApps[index][\"app_name\"]} not found!\")\n                    ));\n                    print(err);\n                  });\n                }\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n\n```\n\nAndroid:\n![screenshot_1536780581](https://user-images.githubusercontent.com/5956938/45448682-48c49e80-b6d3-11e8-8e56-5972b017e233.png)\n\niOS:\n![simulator screen shot - iphone x - 2018-09-12 at 21 27 05](https://user-images.githubusercontent.com/5956938/45448686-4a8e6200-b6d3-11e8-841c-be5b609b8c9b.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fflutter_appavailability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpichillilorenzo%2Fflutter_appavailability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fflutter_appavailability/lists"}