A simple countdown plugin for flutter ⌛

Overview

flutter-countdown

A simple countdown plugin for flutter

gif

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Usage

Countdown

import 'package:flutter/material.dart';
import 'package:countdown_flutter/countdown_flutter.dart';

class Foo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Countdown(
        duration: Duration(seconds: 10),
        onFinish: () {
          print('finished!');
        },
        builder: (BuildContext ctx, Duration remaining) {
            return Text('${remaining.inMinutes}:${remaining.inSeconds}');
        },
      ),
    );
  }
}

CountdownFormatted

import 'package:flutter/material.dart';
import 'package:countdown_flutter/countdown_flutter.dart';

class Foo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: CountdownFormatted(
        duration: Duration(hours: 1),
        builder: (BuildContext ctx, String remaining) {
          return Text(remaining); // 01:00:00
        },
      ),
    );
  }
}
Comments
  • CountDownFormatted not keeping the format

    CountDownFormatted not keeping the format

    If you set the duration to, let's say 5 minutes, the CountDownFormatted shows 00:5:00 (missing a zero). Also, if I set to one hour it shows 1:00:00 but as soon as there's less than one hour the hours "display" disappear showing only the minutes and seconds like 59:59. Would be nice to set the format type we want and keep it on the timer.

    opened by dpedrinha 2
  • Refreshing the countdown formatted time while running

    Refreshing the countdown formatted time while running

    How to refresh current time of countdown formatted while running? For ex. If timer shows 3 mins, when I press a button then it must be changed to 5 mins.

    bug 
    opened by cihanfiliz 1
  • Podspec file needs to be renamed

    Podspec file needs to be renamed

    When attempting to use on iOS, I got No podspec found for... I was able to fix the issue in my local project by renaming .symlinks/plugins/countdown_flutter/ios/countdown.podspec to .symlinks/plugins/countdown_flutter/ios/countdown_flutter.podspec and modifying the s.name in that file to be countdown_flutter.

    I'm guessing it probably broke on this commit: https://github.com/Leocardoso94/flutter-countdown/commit/b599a2701cd1bd6203e83e1c0e18d6c67d555b8b

    Let me know if you'd like me to open a PR, but this is probably a quick fix for you.

    Thanks for sharing your code!

    opened by aaronash 1
  • Deprecated version of the Android embedding

    Deprecated version of the Android embedding

    Describe the bug The plugin countdown_flutter uses a deprecated version of the Android embedding. To avoid unexpected runtime failures or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are the plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

    To Reproduce Steps to reproduce the behavior:

    1. Add the plugin to pubspec.yaml
    2. Run flutter pub get
    3. See error

    Expected behavior Should run pub get without warning.

    Screenshots bidcars – pubspec yaml 9_15_2021 8_05_46 PM

    Additional context If you are the plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

    opened by adityathakurxd 1
  • Build warnings

    Build warnings

    Warning 1

    Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
    This repository is deprecated and it will be shut down in the future.
    See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
    Currently detected usages in: root project 'android', project ':app', project ':countdown_flutter', ...
    Affected Modules: app
    
    

    Warning 2

    Using flatDirs should be avoided because it doesn't support any meta-data formats.
    Currently detected usages:
    - repository flatDir used in: root project 'android', project ':app', project ':countdown_flutter', ...
    Affected Modules: app
    

    To Reproduce Steps to reproduce the behavior:

    1. Build with Android Studio 4.2 and see warning in logs

    Expected behavior This warning should not be shown.

    opened by bes89 0
  •  A problem occurred configuring root project 'countdown_flutter'

    A problem occurred configuring root project 'countdown_flutter'

    APK Build with error

    A problem occurred configuring root project 'countdown_flutter'.

    SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

    opened by levabond 3
Owner
Leonardo Cardoso
Co-founder at @lunahq
Leonardo Cardoso
Countdown app for iOS based on Flutter

countdown A simple countdown tracker app. It allows you to create, modify and delete upcoming and past countdowns. Persistence When creating countdown

jbi 11 Oct 24, 2022
Flutter simple image crop - A simple and easy to use flutter plugin to crop image on iOS and Android

Image Zoom and Cropping plugin for Flutter A simple and easy used flutter plugin to crop image on iOS and Android. Installation Add simple_image_crop

null 97 Dec 14, 2021
This is just the simplyfied Flutter Plugin use for one of the popular flutter plugin for social media login.

social_media_logins Flutter Plugin to login via Social Media Accounts. Available Social Media Logins: Facebook Google Apple Getting Started To use thi

Reymark Esponilla 3 Aug 24, 2022
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Baseflow 1.7k Dec 31, 2022
Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Unloc 1 Nov 26, 2020
Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Gillian 33 Dec 18, 2022
A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also have privilege for fully customization from user side. like flipkart, amazon, myntra, meesho.

step_tracker plugin A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also

Roshan nahak 5 Oct 21, 2022
Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable.

Flutter Counter (iOS & Android) Description Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable. Create i

Salmaan Ahmed 15 Sep 18, 2022
A Flutter plugin for IOS and Android providing a simple way to display PDFs.

Pdf Viewer Plugin A Flutter plugin for IOS and Android providing a simple way to display PDFs. Features: Display PDF. Installation First, add pdf_view

Lucas Britto 56 Sep 26, 2022
Flutter plugin to display a simple steps indicator line widget

steps_indicator A simple steps indicator widget Installation Add steps_indicator: ^1.3.0 in your pubspec.yaml dependencies. And import it: import 'pac

Hugo EXTRAT 49 Oct 18, 2022
A simple yet powerful Flutter plugin for showing Toast at Android, iOS and Web.

Flutter Toast A simple yet powerful Flutter plugin for showing Toast at Android and iOS. Features: Native Toast Pure Flutter Toaster Installation Add

Eyro Labs 5 Dec 13, 2021
Flutter plugin to display a simple numeric keyboard on Android & iOS

numeric_keyboard A simple numeric keyboard widget Installation Add numeric_keyboard: ^1.1.0 in your pubspec.yaml dependencies. And import it: import '

Hugo EXTRAT 16 Sep 27, 2022
Tabbed sliverlist - A simple flutter plugin to setup sliverlist with TabBar with minimal code.

tabbed_sliverlist A package to simplify initialization of TabBar with ListView builder implemented using sliverappbar and sliverlist. Scroll position

Akshay A S 1 Jan 3, 2022
Intent - A simple Flutter plugin to deal with Android Intents

A simple flutter plugin to deal with Android Intents - your one stop solution for Android Intents, written with ❤️ .

Anjan Roy 92 Nov 4, 2022
Flutter Plugin - Simple character blocked input that usually used for redeem/validation input.

Block Input Simple character blocked input that usually used for redeem code or validation code input. Gallery Example Full example import 'package:bl

Enkh-Amar 7 Nov 2, 2022
A simple dependency injection plugin for Flutter and Dart.

A super simple dependency injection implementation for flutter that behaviours like any normal IOC container and does not rely on mirrors

Jon Samwell 91 Dec 13, 2022
This is a simple app that is used to record video using Camera Plugin.

videorecorder A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Moideen Rafih P A 5 Nov 28, 2022
Simple Chat UI - This template is a simple chat ui build with flutter ui toolkit.

Simple Chat UI This template is a simple chat ui build with flutter ui toolkit. TODO dark mode support image support gif, video, ... web mode desktop

null 2 Apr 24, 2022