Giter Club home page Giter Club logo

timer_button's Introduction

Timer Button

License: MIT

A new Flutter package for timer button which will be enabled after specified time.

timer_button

A Button which will be enabled after specified time.

Let's get started

  1. Go to pubspec.yaml
  2. add a ns_utils and replace [version] with the latest version:
dependencies:
  flutter:
    sdk: flutter
  timer_button: ^[version]
  1. click the packages get button or flutter pub get

Import the package

import 'package:timer_button/timer_button.dart';

Usage

Set ButtonType for Button. There are 3 Type of button :

  • RaisedButton buttonType: ButtonType.RaisedButton (default)
  • FlatButton buttonType: ButtonType.FlatButton
  • OutlineButton buttonType: ButtonType.OutlineButton
  • ElevatedButton buttonType: ButtonType.ElevatedButton
  • TextButton buttonType: ButtonType.TextButton
  • OutlinedButton buttonType: ButtonType.OutlinedButton

Set text/label label: "Try Again"

Set timeout in seconds timeOutInSeconds: 20

Set color color: Colors.deepPurple

Set disabled color disabledColor: Colors.red

Example

                new TimerButton(
                  label: "Send OTP Again",
                  timeOutInSeconds: 20,
                  onPressed: () {},
                  disabledColor: Colors.red,
                  color: Colors.deepPurple,
                  disabledTextStyle: new TextStyle(fontSize: 20.0),
                  activeTextStyle: new TextStyle(fontSize: 20.0, color: Colors.white),
                )

For issues and source code

Contributing

There are couple of ways in which you can contribute.

  • Propose any feature, enhancement
  • Report a bug
  • Fix a bug
  • Participate in a discussion and help in decision making
  • Write and improve some documentation. Documentation is super critical and its importance cannot be overstated!
  • Send in a Pull Request :-)

timer_button's People

Contributors

projectaj14 avatar adakar avatar gerald-tetteh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.