{"id":13552259,"url":"https://github.com/DevsOnFlutter/flutter_shortcuts","last_synced_at":"2025-04-03T03:31:05.796Z","repository":{"id":45276668,"uuid":"369385309","full_name":"DevsOnFlutter/flutter_shortcuts","owner":"DevsOnFlutter","description":"Flutter plugin for creating static \u0026 dynamic app shortcuts on the home screen.","archived":false,"fork":false,"pushed_at":"2023-07-18T17:29:09.000Z","size":393,"stargazers_count":53,"open_issues_count":6,"forks_count":19,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T23:34:29.333Z","etag":null,"topics":["app-shortcuts","flutter-plugin","flutter-shortcuts","hacktoberfest","hacktoberfest2021","quick-actions"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_shortcuts","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevsOnFlutter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["divshekhar"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/dshekhar17"]}},"created_at":"2021-05-21T01:51:34.000Z","updated_at":"2023-11-22T09:47:12.000Z","dependencies_parsed_at":"2024-01-19T07:11:19.597Z","dependency_job_id":null,"html_url":"https://github.com/DevsOnFlutter/flutter_shortcuts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fflutter_shortcuts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fflutter_shortcuts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fflutter_shortcuts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fflutter_shortcuts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevsOnFlutter","download_url":"https://codeload.github.com/DevsOnFlutter/flutter_shortcuts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933368,"owners_count":20857047,"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":["app-shortcuts","flutter-plugin","flutter-shortcuts","hacktoberfest","hacktoberfest2021","quick-actions"],"created_at":"2024-08-01T12:02:01.244Z","updated_at":"2025-04-03T03:31:03.918Z","avatar_url":"https://github.com/DevsOnFlutter.png","language":"Dart","funding_links":["https://github.com/sponsors/divshekhar","https://paypal.me/dshekhar17"],"categories":["Dart"],"sub_categories":[],"readme":"# Flutter Shortcuts\n\n\u003cimg src=\"https://i.imgur.com/462Y6wf.gif\" title=\"Flutter_Shortcuts\" /\u003e\n\n![GitHub](https://img.shields.io/github/license/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub language count](https://img.shields.io/github/languages/count/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub issues](https://img.shields.io/github/issues/DevsOnFlutter/flutter_shortcuts?style=plastic) ![GitHub Repo stars](https://img.shields.io/github/stars/DevsOnFlutter/flutter_shortcuts?style=social) ![GitHub forks](https://img.shields.io/github/forks/DevsOnFlutter/flutter_shortcuts?style=social)\n\n## Compatibility\n\n✅ \u0026nbsp; Android \u003c/br\u003e\n❌ \u0026nbsp; iOS (active issue: [iOS support for quick actions](https://github.com/DevsOnFlutter/flutter_shortcuts/issues/1))\n\n## Show some :heart: and :star: the repo\n\n## Why use Flutter Shortcuts?\n\nFlutter Shortcuts Plugin is known for :\n\n| Flutter Shortcuts |\n| :--------------------------------- |\n| Fast, performant \u0026 compatible |\n| Free \u0026 Open-source |\n| Production ready | \n| Make App Reactive |\n\n## Features\n\nAll the features listed below can be performed at the runtime.\n\n✅ \u0026nbsp; Create Shortcuts \u003c/br\u003e\n✅ \u0026nbsp; Clear Shortcuts \u003c/br\u003e\n✅ \u0026nbsp; Update Shortcuts \u003c/br\u003e\n✅ \u0026nbsp; Conversation Shortcuts \u003c/br\u003e\n✅ \u0026nbsp; Use both flutter and android asset as shortcut icon \u003c/br\u003e\n\n## Demo\n\n|\u003cimg height=500 src=\"https://i.imgur.com/UPcyPEl.gif\"/\u003e|\n|---|\n\n## Quick Start\n\n### Step 1: Include plugin to your project\n\n```yml\ndependencies:\n  flutter_shortcuts: \u003clatest version\u003e\n```\n\nRun pub get and get packages.\n\n### Step 2: Instantiate Flutter Shortcuts Plugin\n\n```dart\nfinal FlutterShortcuts flutterShortcuts = FlutterShortcuts();\n```\n\n### Step 3: Initialize Flutter Shortcuts\n\n```dart\nflutterShortcuts.initialize(debug: true);\n```\n\n## Example\n\n### Define Shortcut Action\n\n```dart\nflutterShortcuts.listenAction((String incomingAction) {\n    setState(() {\n    if (incomingAction != null) {\n        action = incomingAction;\n    }\n  });\n});\n```\n\n### Get Max Shortcut Limit\n\nReturn the maximum number of static and dynamic shortcuts that each launcher icon can have at a time.\n\n```dart\nint? result = await flutterShortcuts.getMaxShortcutLimit();\n```\n\n### Shortcut Icon Asset\n\nFlutter Shortcuts allows you to create shortcut icon from both android `drawable` or `mipmap` and flutter Assets.\n\n* If you want to use icon from Android resources, `drawable` or `mipmap`.\n\nuse: `ShortcutIconAsset.androidAsset`\n\n```dart\nShortcutItem(\n  id: \"2\",\n  action: 'Bookmark page action',\n  shortLabel: 'Bookmark Page',\n  icon: \"ic_launcher\",\n  shortcutIconAsset: ShortcutIconAsset.androidAsset,\n),\n```\n\n* If you want to create shortcut icon from flutter asset. (DEFAULT)\n\nuse: `ShortcutIconAsset.flutterAsset`\n\n```dart\nShortcutItem(\n  id: \"2\",\n  action: 'Bookmark page action',\n  shortLabel: 'Bookmark Page',\n  icon: 'assets/icons/bookmark.png',\n  shortcutIconAsset: ShortcutIconAsset.flutterAsset,\n),\n```\n\n### Set shortcut items\n\nPublishes the list of shortcuts. All existing shortcuts will be replaced.\n\n```dart\nflutterShortcuts.setShortcutItems(\n  shortcutItems: \u003cShortcutItem\u003e[\n    const ShortcutItem(\n      id: \"1\",\n      action: 'Home page action',\n      shortLabel: 'Home Page',\n      icon: 'assets/icons/home.png',\n    ),\n    const ShortcutItem(\n      id: \"2\",\n      action: 'Bookmark page action',\n      shortLabel: 'Bookmark Page',\n      icon: \"ic_launcher\",\n      shortcutIconAsset: ShortcutIconAsset.androidAsset,\n    ),\n  ],\n),\n```\n\n### Clear shortcut item\n\nDelete all dynamic shortcuts from the app.\n\n```dart\nflutterShortcuts.clearShortcutItems();\n```\n\n### Push Shortcut Item\n\nPush a new shortcut item. If there is already a dynamic or pinned shortcut with the same **ID**, the shortcut will be updated and pushed at the end of the shortcut list.\n\n```dart\nflutterShortcuts.pushShortcutItem(\n  shortcut: ShortcutItem(\n    id: \"5\",\n    action: \"Play Music Action\",\n    shortLabel: \"Play Music\",\n    icon: 'assets/icons/music.png',\n  ),\n);\n```\n\n### Push Shortcut Items\n\nPushes a list of shortcut item. If there is already a dynamic or pinned shortcut with the same **ID**, the shortcut will be updated and pushed at the end of the shortcut list.\n\n```dart\nflutterShortcuts.pushShortcutItems(\n  shortcutList: \u003cShortcutItem\u003e[\n    const ShortcutItem(\n      id: \"1\",\n      action: 'Home page new action',\n      shortLabel: 'Home Page',\n      icon: 'assets/icons/home.png',\n    ),\n    const ShortcutItem(\n      id: \"2\",\n      action: 'Bookmark page new action',\n      shortLabel: 'Bookmark Page',\n      icon: 'assets/icons/bookmark.png',\n    ),\n    const ShortcutItem(\n      id: \"3\",\n      action: 'Settings Action',\n      shortLabel: 'Setting',\n      icon: 'assets/icons/settings.png',\n    ),\n  ],\n);\n```\n\n### Update Shortcut Item\n\nUpdates a single shortcut item based on id. If the ID of the shortcut is not same, no changes will be reflected.\n\n```dart\nflutterShortcuts.updateShortcutItem(\n  shortcut: ShortcutItem(\n    id: \"1\",\n    action: 'Go to url action',\n    shortLabel: 'Visit Page',\n    icon: 'assets/icons/url.png',\n  ),\n);\n```\n\n### Update Shortcut Items\n\n Updates shortcut items. If the IDs of the shortcuts are not same, no changes will be reflected.\n\n ```dart\nflutterShortcuts.updateShortcutItems(\n  shortcutList: \u003cShortcutItem\u003e[\n    const ShortcutItem(\n      id: \"1\",\n      action: 'Resume playing Action',\n      shortLabel: 'Resume playing',\n      icon: 'assets/icons/play.png',\n    ),\n    const ShortcutItem(\n      id: \"2\",\n      action: 'Search Songs Action',\n      shortLabel: 'Search Songs',\n      icon: 'assets/icons/search.png',\n    ),\n  ],\n);\n ```\n\n### Set Conversation Shortcut\n\nSet `conversationShortcut: true` in ShortcutItem to make the shortcut as conversation shortcut.\n\nThe conversation shortcut can also be set as important and bot by setting `isImportant: true` \u0026 `isBot: true`.\n\n ```dart\nawait flutterShortcuts.pushShortcutItems(\n  shortcutList: \u003cShortcutItem\u003e[\n    const ShortcutItem(\n      id: \"1\",\n      action: 'open_chat_1',\n      shortLabel: 'Divyanshu Shekhar',\n      icon: 'assets/icons/home.png',\n      conversationShortcut: true,\n      isImportant: true,\n    ),\n    const ShortcutItem(\n      id: \"2\",\n      action: 'oepn_chat_2',\n      shortLabel: 'Subham Praharaj',\n      icon: 'assets/icons/bookmark.png',\n      conversationShortcut: true,\n    ),\n    const ShortcutItem(\n      id: \"3\",\n      action: 'oepn_chat_3',\n      shortLabel: 'Auto Reply Bot',\n      icon: 'assets/icons/url.png',\n      conversationShortcut: true,\n      isBot: true,\n    ),\n  ],\n);\n ```\n\n### Change Shortcut Item Icon\n\nChange the icon of the shortcut based on id. If the ID of the shortcut is not same, no changes will be reflected.\n\n```dart\nflutterShortcuts.changeShortcutItemIcon(\n  id: \"2\",\n  icon: \"assets/icons/next.png\",\n);\n```\n\n### Get shortcut icon properties\n\nGet the icon properties of your shortcut icon.\n\n```dart\nMap\u003cString, int\u003e result = await flutterShortcuts.getIconProperties();\nprint( \"maxHeight: ${result[\"maxHeight\"]}, maxWidth: ${result[\"maxWidth\"]}\");\n```\n\n## Project Created \u0026 Maintained By\n\n### Divyanshu Shekhar\n\n\u003ca href=\"https://twitter.com/dshekhar17\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/twitter-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e \u003ca href=\"https://in.linkedin.com/in/divyanshu-shekhar-a8a04a162\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/linkedin-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e \u003ca href=\"https://instagram.com/dshekhar17\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/instagram-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e\n\n[![GitHub followers](https://img.shields.io/github/followers/divshekhar.svg?style=social\u0026label=Follow)](https://github.com/divshekhar/)\n\n### Subham Praharaj\n\n\u003ca href=\"https://twitter.com/SubhamPraharaj6\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/twitter-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e \u003ca href=\"https://www.linkedin.com/in/subham-praharaj-66b172179/\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/linkedin-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e \u003ca href=\"https://instagram.com/the_champ_subham_865\"\u003e\u003cimg src=\"https://github.com/aritraroy/social-icons/blob/master/instagram-icon.png?raw=true\" width=\"60\"\u003e\u003c/a\u003e\n\n[![GitHub followers](https://img.shields.io/github/followers/skpraharaj.svg?style=social\u0026label=Follow)](https://github.com/skpraharaj/)\n\n## Contributions\n\nContributions are welcomed!\n\nIf you feel that a hook is missing, feel free to open a pull-request.\n\nFor a custom-hook to be merged, you will need to do the following:\n\nDescribe the use-case.\n\n* Open an issue explaining why we need this hook, how to use it, ...\n  This is important as a hook will not get merged if the hook doens't appeal to\n  a large number of people.\n\n* If your hook is rejected, don't worry! A rejection doesn't mean that it won't\n  be merged later in the future if more people shows an interest in it.\n  In the mean-time, feel free to publish your hook as a package on https://pub.dev.\n\n* A hook will not be merged unles fully tested, to avoid breaking it inadvertendly\n  in the future.\n  \n## Stargazers\n[![Stargazers repo roster for @DevsOnFlutter/flutter_shortcuts](https://reporoster.com/stars/dark/DevsOnFlutter/flutter_shortcuts)](https://github.com/DevsOnFlutter/flutter_shortcuts/stargazers)\n\n## Forkers\n\n[![Forkers repo roster for @DevsOnFlutter/flutter_shortcuts](https://reporoster.com/forks/dark/DevsOnFlutter/flutter_shortcuts)](https://github.com/DevsOnFlutter/flutter_shortcuts/network/members)\n\n## Copyright \u0026 License\n\nCode and documentation Copyright (c) 2021 [Divyanshu Shekhar](https://hackthedeveloper.com). Code released under the [BSD 3-Clause License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevsOnFlutter%2Fflutter_shortcuts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevsOnFlutter%2Fflutter_shortcuts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevsOnFlutter%2Fflutter_shortcuts/lists"}