vibe_timer 0.0.2
vibe_timer: ^0.0.2 copied to clipboard
A customizable animated countdown and count-up timer widget for Flutter.
import 'package:flutter/material.dart';
import 'package:vibe_timer/vibe_timer.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
VibeTimer(
duration: Duration(minutes: 1, seconds: 59),
mode: TimerMode.countDown,
showControllers: true,
showHours: true,
showMinutes: true,
showSeconds: true,
textStyle: TextStyle(
fontSize: 60,
color: Colors.white,
fontWeight: FontWeight.w600,
),
iconColor: Colors.black,
animate: true,
animationType: VibeAnimationType.slide,
)
],
),
),
);
}
}