{"id":15550030,"url":"https://github.com/outdatedguy/hold_down_button","last_synced_at":"2025-03-28T19:46:28.116Z","repository":{"id":54332788,"uuid":"494138510","full_name":"OutdatedGuy/hold_down_button","owner":"OutdatedGuy","description":"A Flutter package to trigger an action repeatedly when a widget is hold/pressed down.","archived":false,"fork":false,"pushed_at":"2024-08-01T16:57:45.000Z","size":722,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T13:38:08.450Z","etag":null,"topics":["flutter-package"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/hold_down_button","language":"C++","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/OutdatedGuy.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["OutdatedGuy"]}},"created_at":"2022-05-19T15:58:16.000Z","updated_at":"2024-08-01T16:57:37.000Z","dependencies_parsed_at":"2025-02-17T13:37:07.698Z","dependency_job_id":null,"html_url":"https://github.com/OutdatedGuy/hold_down_button","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Fhold_down_button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Fhold_down_button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Fhold_down_button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Fhold_down_button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutdatedGuy","download_url":"https://codeload.github.com/OutdatedGuy/hold_down_button/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093099,"owners_count":20722395,"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":["flutter-package"],"created_at":"2024-10-02T13:47:28.999Z","updated_at":"2025-03-28T19:46:28.095Z","avatar_url":"https://github.com/OutdatedGuy.png","language":"C++","readme":"# Hold Down Button\n\nA Flutter package to trigger an action repeatedly when a widget is hold/pressed down.\n\n[![pub package][package_svg]][package]\n[![GitHub][license_svg]](LICENSE)\n\n[![GitHub issues][issues_svg]][issues]\n[![GitHub issues closed][issues_closed_svg]][issues_closed]\n\n\u003chr /\u003e\n\n## Features\n\n- `HoldDownButton` displays the child widget passed to it and acts when it is pressed.\n- You can customize the **_time delay curve_** to make the button trigger action more or less quickly.\n- Also you can set time delay for the periodic function call.\n\n![demo](https://user-images.githubusercontent.com/74326345/169374847-98cb7ba5-22d3-4347-b479-4f34fe77c501.gif)\n\n## Getting started\n\n#### Add to Dependencies\n\n```yaml\nhold_down_button: ^1.1.0\n```\n\n#### Import the package\n\n```dart\nimport 'package:hold_down_button/hold_down_button.dart';\n```\n\n## Usage\n\n#### Using the Widget with default values\n\n```dart\nHoldDownButton(\n  onHoldDown: () =\u003e print('Pressed'),\n  child: ElevatedButton(\n    onPressed: () =\u003e print('Pressed'),\n    child: const Text('ElevatedButton'),\n  ),\n),\n```\n\n#### Customizing initial delay curve\n\n```dart\nHoldDownButton(\n  onHoldDown: () =\u003e print('Pressed'),\n  longWait: const Duration(seconds: 1),\n  middleWait: const Duration(milliseconds: 750),\n  minWait: const Duration(milliseconds: 500),\n  child: ElevatedButton(\n    onPressed: () =\u003e print('Pressed'),\n    child: const Text('ElevatedButton'),\n  ),\n),\n```\n\n#### Changing the time delay for periodic function call\n\n```dart\nHoldDownButton(\n  onHoldDown: () =\u003e print('Pressed'),\n  holdWait: const Duration(milliseconds: 200),\n  child: ElevatedButton(\n    onPressed: () =\u003e print('Pressed'),\n    child: const Text('ElevatedButton'),\n  ),\n),\n```\n\n## Description\n\n|    Field     |                        Description                        |      Type      |               Default               |\n| :----------: | :-------------------------------------------------------: | :------------: | :---------------------------------: |\n|   `child`    |           **The child widget to be displayed.**           |    _Widget_    |                  -                  |\n| `onHoldDown` | **The callback to be called when the button is pressed.** | _VoidCallback_ |                  -                  |\n|  `holdWait`  |      **The time delay for periodic function call.**       |   _Duration_   | `const Duration(milliseconds: 100)` |\n|  `longWait`  |             **Time delay 2nd function call.**             |   _Duration_   | `const Duration(milliseconds: 500)` |\n| `middleWait` |             **Time delay 3rd function call.**             |   _Duration_   | `const Duration(milliseconds: 350)` |\n|  `minWait`   |             **Time delay 4th function call.**             |   _Duration_   | `const Duration(milliseconds: 200)` |\n\n### If you liked the package, then please give it a [Like 👍🏼][package] and [Star ⭐][repository]\n\n\u003c!-- Badges URLs --\u003e\n\n[package_svg]: https://img.shields.io/pub/v/hold_down_button.svg?color=blueviolet\n[license_svg]: https://img.shields.io/github/license/OutdatedGuy/hold_down_button.svg?color=purple\n[issues_svg]: https://img.shields.io/github/issues/OutdatedGuy/hold_down_button.svg\n[issues_closed_svg]: https://img.shields.io/github/issues-closed/OutdatedGuy/hold_down_button.svg?color=green\n\n\u003c!-- Links --\u003e\n\n[package]: https://pub.dev/packages/hold_down_button\n[repository]: https://github.com/OutdatedGuy/hold_down_button\n[issues]: https://github.com/OutdatedGuy/hold_down_button/issues\n[issues_closed]: https://github.com/OutdatedGuy/hold_down_button/issues?q=is%3Aissue+is%3Aclosed\n","funding_links":["https://github.com/sponsors/OutdatedGuy"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdatedguy%2Fhold_down_button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutdatedguy%2Fhold_down_button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdatedguy%2Fhold_down_button/lists"}