搜索插件、代码仓与 APP 分类

GitHub 代码仓yassinedevop/neon_circular_timer

neon_circular_timer

制作一个带有华丽霓虹效果和精美用户界面的计时器应用

neon_circular_timer 项目封面
星标
11
复刻
7
最近推送(UTC)
2024年9月9日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

neon_circular_timer

Make a timer application with a fancy neon effect and beautiful UI

v0.0.3 and above now the timer has also a neumorphic border

Preview of example

example preview

Usage

Use neumorphicEffect to show or hide the neumorphic border

Use isTimerTextShown to show or hide the text

With neumorphicEffect is true and isTimerTextShown is false


  NeonCircularTimer(
                width: 200,
                    duration: 20,
                    controller : your_controller
                    isTimerTextShown: false,
                    neumorphicEffect: true,
                    innerFillGradient: LinearGradient(colors: [
                      Colors.greenAccent.shade200,
                      Colors.blueAccent.shade400
                    ]),
                    neonGradient: LinearGradient(colors: [
                      Colors.greenAccent.shade200,
                      Colors.blueAccent.shade400
                    ]),
                   ),

neum no text

with neumorphicEffect is false and isTimerTextShown is false
  NeonCircularTimer(
                width: 200,
                    duration: 20,
                    controller : your_controller
                    isTimerTextShown: false,
                    neumorphicEffect: false,
                    innerFillGradient: LinearGradient(colors: [
                      Colors.greenAccent.shade200,
                      Colors.blueAccent.shade400
                    ]),
                    neonGradient: LinearGradient(colors: [
                      Colors.greenAccent.shade200,
                      Colors.blueAccent.shade400
                    ]),
                   ),

no txt nor neum

Parameters

Name Type Default Value Description
key Key null Key for Countdown Timer.
neon double 4.0 The itensity of the neon
duration int required Countdown duration in Seconds.
initialDuration int 0 Countdown initial elapsed Duration in Seconds.
controller CountDownController required Controls (i.e Start, Pause, Resume, Restart) the Countdown Timer.
width double required Width of the rectangle that surrounds the circle ( Diameter of the Countdown Timer).
neonColor Color Colors.white54 neon Color for Countdown Widget.
neonGradient Gradient null neon Gradient for Countdown Widget. Note that neonColor will not be effective if gradient is provided.
neumorphicEffect bool true show neumorphic border
innerFillColor Color Colors.black12 Filling Color for Countdown Widget.
innerFillGradient Gradient null Filling Gradient for Countdown Widget. Note that fillColor will not be effective if gradient is provided.
outerStrokeColor Color Colors.white border Color for Countdown Widget.
backgroundColor Color Colors.white54 must be provided if you choose to use neumorphic effect .
outerStrokeGradient Gradient null border Gradient for Countdown Widget. Note that backgroundColor will not be effective if gradient is provided.
strokeWidth double 10.0 Border Thickness of the Countdown Ring.
strokeCap StrokeCap StrokeCap.round Begin and end contours with a flat edge and no extension.
textStyle TextStyle Theme.of(context).textTheme.headline3 Text Style for Countdown Text.
textFormat String TextFormat.MM_SS Format for the Countdown Text.
isReverse bool false Handles Countdown Timer (true for Reverse Countdown (max to 0), false for Forward Countdown (0 to max)).
isReverseAnimation bool false Handles Animation Direction (true for Reverse Animation, false for Forward Animation).
isTimerTextShown bool true Handles visibility of the Countdown Text.
autoStart bool true Handles the timer start.
onStart VoidCallback null This Callback will execute when the Countdown Starts.
onComplete VoidCallback null This Callback will execute when the Countdown Ends.

About the Controller

to get the time in seconds use :

controller.getCurrentTimeInSeconds();

to get the time formated into the selected TextFormat use:

controller.getTime();

to control the timer use :

controller.restart(); // to reset the timer
controller.start(); // to start the timer from 0
controller.pause(); // to pause the timer
controller.resume(); // to continue from the value where the timer stopped
yassine GitHub avatar
GitHub 作者

yassine ↗

PhD researcher, Elelctrical Engineer, physics and math enthusiast , C++ and android developer

语言DartHTMLSwiftKotlinObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 2 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗