๐๏ธ Vibe Timer
Vibe Timer is a beautiful and customizable Flutter countdown/count-up timer widget, built with animated digits, sounds, and interactive controls โ perfect for meditation, workouts, study sessions, productivity apps, and more.
๐ฅ Demo
โจ Features
- โ Supports both countdown and count-up
- โฑ๏ธ Smooth digit animations:
slide
andscale
. - ๐ Optional tick and finish sounds
- ๐ฎ Interactive controls: play, pause, reset
- ๐จ Fully customizable layout (icons, text, colors)
๐ Installation
Add to your pubspec.yaml
:
dependencies:
vibe_timer: ^0.0.1
Then run:
flutter pub get
๐งช Example
import 'package:vibe_timer/vibe_timer.dart';
VibeTimer(
duration: Duration(minutes: 2, seconds: 30),
mode: TimerMode.countDown,
animate: true,
animationType: VibeAnimationType.slide,
textStyle: TextStyle(
fontSize: 48,
color: Colors.blueAccent,
fontWeight: FontWeight.bold,
),
showControllers: true,
iconColor: Colors.blueAccent,
playIcon: Icon(Icons.play_circle),
pauseIcon: Icon(Icons.pause_circle),
resetIcon: Icon(Icons.refresh),
)
๐จ Customization
Property | Type | Description |
---|---|---|
duration |
Duration |
Total timer duration |
mode |
TimerMode |
countDown or countUp |
animate |
bool |
Enables/disables animations |
animationType |
VibeAnimationType |
Animation type: slide , scale |
textStyle |
TextStyle |
Style for the timer text |
showControllers |
bool |
Show/hide control buttons |
iconColor |
Color |
Color of the control icons |
playIcon , pauseIcon , resetIcon |
Widget? |
Custom icons for control buttons |
autoPlay |
bool |
Auto start the timer on init |
showHours , showMinutes , showSeconds |
bool |
Show/hide individual time units |
๐ Sound Support
You can add ticking and finish sounds:
VibeTimer(
...
sound: true,
tickSoundAsset: 'assets/sounds/tick.mp3',
finishSoundAsset: 'assets/sounds/ding.mp3',
)
Make sure to declare the assets in your pubspec.yaml
:
flutter:
assets:
- assets/sounds/tick.mp3
- assets/sounds/ding.mp3
๐ License
MIT License. See LICENSE for details.
๐ค Contributing
Contributions and feedback are welcome! Feel free to open issues, submit PRs, or share ideas to make this widget even better.