{"id":24377783,"url":"https://github.com/aissat/easy_count_timer","last_synced_at":"2025-04-10T19:51:33.313Z","repository":{"id":195668996,"uuid":"693407232","full_name":"aissat/easy_count_timer","owner":"aissat","description":"It is a simple customizable timer for counting [up/down] a given time with any Custom TextStyle.","archived":false,"fork":false,"pushed_at":"2023-09-22T15:27:36.000Z","size":280,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T17:49:53.064Z","etag":null,"topics":["countdown","counter","counterup","flutter-timer","stopwatch","timer"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/easy_count_timer","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/aissat.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T01:15:30.000Z","updated_at":"2024-11-11T10:24:11.000Z","dependencies_parsed_at":"2025-01-19T06:27:14.813Z","dependency_job_id":null,"html_url":"https://github.com/aissat/easy_count_timer","commit_stats":null,"previous_names":["aissat/easy_count_timer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_count_timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_count_timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_count_timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_count_timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aissat","download_url":"https://codeload.github.com/aissat/easy_count_timer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283687,"owners_count":21077902,"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":["countdown","counter","counterup","flutter-timer","stopwatch","timer"],"created_at":"2025-01-19T06:17:01.401Z","updated_at":"2025-04-10T19:51:33.292Z","avatar_url":"https://github.com/aissat.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n```easy_count_timer``` is a Flutter package that provides a Timer functionality and is a fork of [`flutter_timer_countdown`](https://pub.dev/packages/flutter_timer_countdown)\n✨\n\nIt is a simple customizable timer for counting [`up`/`down`] a given time with any Custom TextStyle.\n\nSupporting Android, iOS \u0026 WebApp.\n\n## Why?\n\nWe build this package because we wanted to:\n\n- be able use count timer up/down easily\n- `CountTimerController` to controll timer `stop`, `puase` ...\n- have simple timer\n- customize timer textstyles\n- choose the timer description\n- be able to unable the timer description\n\n## ❗NEW  Features ❗\n\n### Customizable space between number units and colons\n\nWith the parameter ```spacerWidth``` you can now define the size of the space between number units and colons. The default is set to ```10``` (double).\n\n## Show Cases\n\n\u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/timer_description.gif?raw=true\" height=\"200\" /\u003e \u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/timer.gif?raw=true\" height=\"200\" /\u003e\n\nShow only the time units you want to...\n\n\u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/no_seconds.png?raw=true\" height=\"200\"\u003e \u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/no_minutes_seconds.png?raw=true\" height=\"200\"\u003e\n\nShow only days, hours, minutes, seconds...\n\n\u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/days.png?raw=true\" height=\"200\"\u003e \u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/hours.png?raw=true\" height=\"200\"\u003e\n\n\u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/minutes.png?raw=true\" height=\"200\"\u003e \u003cimg src=\"https://github.com/appinioGmbH/flutter_packages/blob/main/assets/timer_countdown/seconds.gif?raw=true\" height=\"200\" /\u003e\n\n## Installation\n\nCreate a new project with the command\n\n```yaml\nflutter create MyApp\n```\n\nAdd\n\n```yaml\neasy_count_timer: ...\n```\n\nto your `pubspec.yaml` of your flutter project.\n**OR**\nrun\n\n```yaml\nflutter pub add easy_count_timer\n```\n\nin your project's root directory.\n\nIn your library add the following import:\n\n```dart\nimport 'package:easy_count_timer/easy_count_timer.dart';\n```\n\nFor help getting started with Flutter, view the online [documentation](https://flutter.io/).\n\n## Usage\n\nYou can place your `CountTimer` inside of a `Scaffold` or `CupertinoPageScaffold` like we did here. Optional parameters can be defined to enable different features. See the following example..\n\n```dart\nimport 'package:easy_count_timer/easy_count_timer.dart';\nimport 'package:flutter/cupertino.dart';\n\nclass CounterUpTimer extends StatefulWidget {\n  const CounterUpTimer({super.key});\n\n  @override\n  State\u003cCounterUpTimer\u003e createState() =\u003e _CounterUpTimerState();\n}\n\nclass _CounterUpTimerState extends State\u003cCounterUpTimer\u003e {\n\n  var controller = CountTimerController();\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        CupertinoPageScaffold(\n          child: CountTimer(\n              format: CountTimerFormat.daysHoursMinutesSeconds,\n              controller: CountTimerController(),\n            ),\n        ),\n        Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [\n            IconButton(\n                onPressed: () {\n                  controller.start();\n                },\n                icon: Icon(Icons.play_arrow_rounded)),\n            IconButton(\n                onPressed: () {\n                  controller.puase();\n                },\n                icon: Icon(Icons.pause_rounded)),\n            IconButton(\n                onPressed: () {\n                  controller.stop();\n                },\n                icon: Icon(Icons.stop_rounded)),\n            IconButton(\n                onPressed: () {\n                  controller.reset();\n                },\n                icon: Icon(Icons.restart_alt_rounded)),\n          ]),\n      ],\n    );\n  }\n}\n```\n\nexamlpe :\n\n```dart\nimport 'package:easy_count_timer/easy_count_timer.dart';\nimport 'package:flutter/cupertino.dart';\n\nclass CounterDownTimer extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return CupertinoPageScaffold(\n      child: CountTimer(\n          format: CountTimerFormat.daysHoursMinutesSeconds,\n          controller:CountTimerController(\n            endTime: DateTime.now().add(\n              Duration(\n                days: 5,\n                hours: 14,\n                minutes: 27,\n                seconds: 34,\n              ),\n            ),\n          ),\n          onEnd: () {\n            print(\"Timer finished\");\n          },\n        ),\n    );\n  }\n}\n```\n\n## Constructor\n#### Basic\n\n| Parameter        | Default           | Description  | Required  |\n| ------------- |:-------------|:-----|:-----:|\n| controller      | - | Defines the controller time when is null time counter `countdown` else `countup`  | false\n| format      | DaysHoursMinutesSeconds | Format for the timer choose between different ```CountTimerFormat```s | false\n| onEnd      | - | Function to call when the timer is over | false\n| enableDescriptions      | - | Toggle time units descriptions | false\n| timeTextStyle      | - | ```TextStyle``` for the time numbers | false\n| colonsTextStyle      | - | ```TextStyle``` for the colons betwenn the time numbers | false\n| descriptionTextStyle      | - | ```TextStyle``` for the timer description | false\n| daysDescription      | Days | Days unit description | false\n| hoursDescription      | Hours | Hours unit description | false\n| minutesDescription      | Minutes | Minutes unit description | false\n| secondsDescription      | Seconds | Seconds unit description | false\n| spacerWidth      | 10 | Defines the width between the colons and the units | false\n\n##### Controller\n\n| Parameter        | Default           | Description  | Required  |\n| ------------- |:-------------|:-----|:-----:|\n| endTime      | - | Defines the time when the timer is over   | false\n\n```dart\n\n  // Create an instance of the Controller used for timer Counter Up\n  var controllerCounterUp = CountTimerController();\n\n  // Start the controller\n  controllerCounterUp.start()\n\n  // Stop the controller\n  controllerCounterUp.stop()\n\n  // Reset the controller\n  controllerCounterUp.reset()\n\n  // Restart the controller\n  controllerCounterUp.restart()\n\n  // Pause the controller\n  controllerCounterUp.pause()\n\n  // // Create an instance of the Controller used for timer Counter Down\n  var controllerCounterDown = CountTimerController(endTime:DateTime.now().add(\n              Duration(\n                days: 5,\n                hours: 14,\n                minutes: 27,\n                seconds: 34,\n              ),\n            ),\n          );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faissat%2Feasy_count_timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faissat%2Feasy_count_timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faissat%2Feasy_count_timer/lists"}