Giter Site home page Giter Site logo

manishdayma / flutter_buttons Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 708 KB

A Flutter package for all kind of buttons.

Home Page: https://pub.dev/packages/buttons_flutter

License: MIT License

Kotlin 0.20% Swift 1.79% Objective-C 0.06% Dart 31.77% CMake 28.86% C++ 32.30% C 2.20% HTML 2.81%
button-widget dart dart-lib dart-library dart-package dartlang flutter flutter-button flutter-package flutter-packages

flutter_buttons's Introduction

Flutter Buttons

MIT License

A Flutter package to create different type of buttons.

Getting Started

You must add the library as a dependency to your project.

dependencies:
  buttons_flutter: ^0.0.2+1

You should then run flutter pub get

Now in your Dart code, you can use:

import 'package:buttons_flutter/buttons_flutter.dart';

Usage Example

It very simple to use.

Standard Button

        Button(
            borderRadius: 10,
            bgColor: Colors.blueAccent,
            margin: const EdgeInsets.symmetric(
              horizontal: 10,
              vertical: 20,
            ),
            onPressed: () {
              // some method calls
            },
            child: Text("I am Button"),
          )

Standard Button

Border Button

       BorderButton(
            borderRadius: 10,
            borderColor: Colors.blueAccent,
            margin: const EdgeInsets.symmetric(
              horizontal: 10,
              vertical: 20,
            ),
            onPressed: () {
              // some method calls
            },
            child: const Text("I am Border Button"),
          ),

Border Button

Slider Button

       SliderButton(
              buttonColor: Colors.blueGrey,
              alignLabel: Alignment.center,
              action: () {
                ///Do something here
                showSnack(context, "Slider button action triggered");
              },
              label: const Text(
                "Slide to Right",
                style: TextStyle(
                  color: Color(0xff4a4a4a),
                  fontWeight: FontWeight.w500,
                  fontSize: 17,
                ),
              ),
              icon: const Text(
                "x",
                style: TextStyle(
                  color: Colors.black,
                  fontWeight: FontWeight.w400,
                  fontSize: 44,
                ),
              ),
            )

Slider Button

Rounded Icon Button

       RoundedIconButton(
                borderColor: Colors.red,
                bgColor: Colors.red,
                borderWidth: 0,
                child: const Padding(
                  padding: EdgeInsets.all(15.0),
                  child: Icon(
                    Icons.home,
                    size: 30.0,
                    color: Colors.white,
                  ),
                ),
                onPressed: () {
                 // some method calls
                },
              ),

Rounded Icon Button

Rect Icon Button

       RectIconButton(
                borderColor: Colors.red,
                borderWidth: 3,
                child: const Padding(
                  padding: EdgeInsets.all(15.0),
                  child: Icon(
                    Icons.message,
                    size: 30.0,
                    color: Colors.white,
                  ),
                ),
                onPressed: () {
                  // some method calls
                },
              ),

Rect Icon Button

Support

Buy Me A Coffee

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.