Count Down Timer In Flutter

Count Down Timer In Flutter :

Count Down Timer In Flutter
import 'package:flutter/material.dart';

Countdown timer
                      children: <Widget>[
                        Text(' Countdown timer '),
                        SizedBox(width: 10,),
                          seconds: 120,
                          textStyle: TextStyle(color:,
class Countdown extends StatefulWidget {
  final int seconds;
  final VoidCallback onFinish;
  final TextStyle textStyle;

  Countdown({this.seconds = 60, this.onFinish, this.textStyle});

  CountdownState createState() => CountdownState();

class CountdownState extends State<Countdown> with TickerProviderStateMixin {
  AnimationController controller;
  Animation<double> animation;

  String get timerString {
    Duration duration = controller.duration * controller.value;
    return '${duration.inMinutes}:${(duration.inSeconds % 60).toString().padLeft(2, '0')}';

  void initState() {
    controller = AnimationController(
        duration: Duration(seconds: widget.seconds), vsync: this);
    animation = CurvedAnimation(parent: controller, curve: Curves.easeIn);

    animation.addStatusListener((status) {
      if (status == AnimationStatus.completed) {
      } else if (status == AnimationStatus.dismissed) {

    controller.reverse(from: 1.0);

  Widget build(BuildContext context) {
    return AnimatedBuilder(
        animation: controller,
        builder: (BuildContext context, Widget child) {
          return new Text(
            style: widget.textStyle,

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit