{"id":32280881,"url":"https://github.com/zamaniafshar/complete_timer","last_synced_at":"2026-02-21T08:02:40.408Z","repository":{"id":41477569,"uuid":"509060786","full_name":"zamaniafshar/complete_timer","owner":"zamaniafshar","description":"A dart timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel.","archived":false,"fork":false,"pushed_at":"2022-07-18T07:19:17.000Z","size":22,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T16:23:09.062Z","etag":null,"topics":["complete-timer","dart-timer","flutter","flutter-timer","resumable-timer","timer"],"latest_commit_sha":null,"homepage":"","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/zamaniafshar.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":"2022-06-30T11:56:16.000Z","updated_at":"2025-09-08T18:36:32.000Z","dependencies_parsed_at":"2022-09-06T01:31:50.672Z","dependency_job_id":null,"html_url":"https://github.com/zamaniafshar/complete_timer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zamaniafshar/complete_timer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamaniafshar%2Fcomplete_timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamaniafshar%2Fcomplete_timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamaniafshar%2Fcomplete_timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamaniafshar%2Fcomplete_timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zamaniafshar","download_url":"https://codeload.github.com/zamaniafshar/complete_timer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zamaniafshar%2Fcomplete_timer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29676986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["complete-timer","dart-timer","flutter","flutter-timer","resumable-timer","timer"],"created_at":"2025-10-23T00:50:36.317Z","updated_at":"2026-02-21T08:02:40.403Z","avatar_url":"https://github.com/zamaniafshar.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"A timer that can be configured to fire once or repeatedly with ability\nstart, stop, resume and cancel.\n\n## Getting started\n\nAdd `CompleteTimer` to your pubspec.yaml file:\n\n```yaml\ndependencies:\n  complete_timer: ^1.0.0\n```\nImport `CompleteTimer` in files that it will be used:\n\n```dart\nimport 'package:complete_timer/complete_timer.dart';\n```\n## How to use?\nCreate a `CompleteTimer` and give duration and callback you want to fire after the given duration.\n\n```dart\n// By default the timer starts automatically.\nfinal CompleteTimer timer = CompleteTimer(\n    duration: Duration(seconds: 5),\n    // The callback function is invoked after the given duration.\n    callback: (timer) {\n      print('timer finished');\n    },\n  );\n```\n## Params\n\n```dart\n  final CompleteTimer normalTimer = CompleteTimer(\n    // must a non-negative Duration.\n    duration: Duration(seconds: 5),\n    \n    // If periodic sets true\n    // The callback is invoked repeatedly with duration intervals until\n    // canceled with the cancel function.\n    // Defaults to false.\n    periodic: false,\n    \n    // If autoStart sets true timer starts automatically, default to true.\n    autoStart: true,\n    \n    // The callback function is invoked after the given duration.\n    callback: (timer) {\n      print('normal example');\n      timer.stop();\n      // We call stop function before getting elapsed time to get a exact time.\n      print('normal timer finished after: ${timer.elapsed}');\n    },\n  );\n```\n\n## CompleteTimer methods\n\n- #### start()\n        Start the timer, you don't need to call it if autoStart sets true.\n        If call when the timer already started, then it resume the timer\n        which this means elapsed and tick starts increasing from their previous value.\n        \n- #### stop()\n        Stop the timer.\n        The elapsed and tick stops increasing after this call.\n        If call when timer is stopped does nothing.\n\n- #### cancel()\n        Cancel the timer.\n        The elapsed and tick resets after this call.\n        \n- #### elapsed\n        Elapsed time.\n        \n- #### tick\n        The value starts at zero and is incremented each time a timer event\n        occurs, so each callback will see a larger value than the previous one.\n        \n - #### isRunning\n        Whether the CompleteTimer is currently running.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamaniafshar%2Fcomplete_timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzamaniafshar%2Fcomplete_timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzamaniafshar%2Fcomplete_timer/lists"}