{"id":19426565,"url":"https://github.com/prash5t/interpolated_countdown","last_synced_at":"2026-01-11T04:12:16.434Z","repository":{"id":213737338,"uuid":"734810497","full_name":"prash5t/interpolated_countdown","owner":"prash5t","description":"Easy to use class to build interpolated countdown widget in Flutter","archived":false,"fork":false,"pushed_at":"2023-12-27T07:10:57.000Z","size":399,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T19:38:20.268Z","etag":null,"topics":["countdown-timer","flutter","flutter-package","flutter-widget"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prash5t.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-12-22T17:24:21.000Z","updated_at":"2023-12-22T23:34:20.000Z","dependencies_parsed_at":"2023-12-22T18:32:20.146Z","dependency_job_id":"08d2bc63-5afe-40c3-a13c-ce938c9e32e1","html_url":"https://github.com/prash5t/interpolated_countdown","commit_stats":null,"previous_names":["aprashantz/interpolated_countdown","prash5t/interpolated_countdown"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prash5t%2Finterpolated_countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prash5t%2Finterpolated_countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prash5t%2Finterpolated_countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prash5t%2Finterpolated_countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prash5t","download_url":"https://codeload.github.com/prash5t/interpolated_countdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240605840,"owners_count":19827985,"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-timer","flutter","flutter-package","flutter-widget"],"created_at":"2024-11-10T14:08:11.854Z","updated_at":"2026-01-11T04:12:16.340Z","avatar_url":"https://github.com/prash5t.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.ibb.co/XYsJCRM/banner.jpg\" /\u003e\n  \u003ch4 align=\"center\"\u003eInterpolated Countdown\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n      Easy to use class to build interpolated countdown widget\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003c!-- \u003ca href=\"https://github.com/aprashantz/interpolated_countdown/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/aprashantz/interpolated_countdown?label=License\" /\u003e\n  \u003c/a\u003e --\u003e\n  \u003ca href=\"https://pub.dev/packages/interpolated_countdown\"\u003e\n    \u003cimg alt=\"Pub version\" src=\"https://img.shields.io/pub/v/interpolated_countdown?color=blue\" /\u003e\n  \u003c/a\u003e\n  \u003c!--\u003ca href=\"#contributors\"\u003e\n    \u003cimg alt=\"Contributors\" src=\"https://img.shields.io/github/all-contributors/aprashantz/interpolated_countdown/main\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e --\u003e\n\n## Installation\n\nAdd the following to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  interpolated_countdown: ^1.0.0\n```\n\n## Basic Usage\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:interpolated_countdown/interpolated_countdown.dart';\n\nvoid main() {\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    // Create a CountDownUseCase instance with your configuration\n  CountDownUseCase useCase = CountDownUseCase(\n  timerTextSize: 55,\n  diameter: 204,\n  totalDuration: const Duration(seconds: 30),\n  stopAnimationOnTimeElapsed: false,\n  plateShape: BoxShape.circle,\n  outerPlateColorRange: DefaultInterpolationColors.outerPlateColorRange,\n  innerPlateColorRange: DefaultInterpolationColors.innerPlateColorRange,\n);\n\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(\n          title: Text('Countdown Widget Example'),\n        ),\n        body: Center(\n          child: CountdownWidget(\n            countdownUseCase: useCase,\n          ),\n        ),\n      ),\n    );\n  }\n}\n\n```\n\n### CountDownUseCase\n\nThe `CountDownUseCase` class is used to manage the countdown logic and plate colors in the interpolated countdown widget. Below are the parameters that can be configured when creating an instance of this class.\n\n#### Parameters\n\n- `timerTextSize` (Type: `double`, Default: `55`): Font size of the timer text.\n\n- `diameter` (Type: `double`, Default: `204`): Diameter of the countdown widget.\n\n- `totalDuration` (Type: `Duration`, Default: `Duration(seconds: 30)`): Total duration of the countdown.\n\n- `stopAnimationOnTimeElapsed` (Type: `bool`, Default: `false`): Whether to stop the animation when time reaches zero.\n\n- `plateShape` (Type: `BoxShape`, Default: `BoxShape.circle`): Shape of the countdown widget plates.\n\n- `callBackOnEverySecondConsumed` (Type: `Function(int secondsConsumed)?`, Default: `null`): A callback function that will be called every second during the countdown. It receives the total seconds consumed as a parameter.\n\n- `outerPlateColorRange` (Type: `ColorRangeModel`, Required): Color range for the outer plate.\n\n- `innerPlateColorRange` (Type: `ColorRangeModel`, Required): Color range for the inner plate.\n\n### Example\n\n```dart\nCountDownUseCase useCase = CountDownUseCase(\n  timerTextSize: 55,\n  diameter: 204,\n  totalDuration: Duration(seconds: 30),\n  stopAnimationOnTimeElapsed: false,\n  plateShape: BoxShape.circle,\n  callBackOnEverySecondConsumed: (int secondsConsumed) {\n    print('Seconds Consumed: $secondsConsumed');\n  },\n  outerPlateColorRange: ColorRangeModel(\n    firstColor: Colors.green,\n    midColor: Colors.yellow,\n    lastColor: Colors.red,\n  ),\n  innerPlateColorRange: ColorRangeModel(\n    firstColor: Colors.blue,\n    midColor: Colors.purple,\n    lastColor: Colors.orange,\n  ),\n);\n```\n\nFor more details on the CountDownUseCase class and its methods, refer to the source code.\n\n### GitHub Repo\n\nVisit [https://github.com/aprashantz/interpolated_countdown](https://github.com/aprashantz/interpolated_countdown) to explore more and further customize/contribute as you wish. :)\nDanke schön!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprash5t%2Finterpolated_countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprash5t%2Finterpolated_countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprash5t%2Finterpolated_countdown/lists"}