AyushBherwani1998 / extended_button

A flutter package with extended creative button.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

A Flutter package to create a beautiful extended button which can expand and shrink whenever the user clicks on the button.

pub package Codemagic build status

Shrunk state

Extended Closed

Expanded state

Extended Opend

Usage

Add extended_buttonas a dependency in your pubspec.yaml

 dependencies:
  flutter:
    sdk: flutter
  extended_button: 0.0.1

Run flutter pub get in the terminal and import import 'package:extended_button/extended_button.dart'

Example

void main() => runApp(MaterialApp(
  home: Scaffold(
    appBar: AppBar(
      title: Text("Extended Button Demo"),
    ),
    body: Container(
      alignment: Alignment.center,
      child: ExtendedButton(
        size: 100,
        bottomLeftIcon: Icons.shopping_cart,
        bottomRightIcon: Icons.print,
        topLeftIcon: Icons.photo,
        topRightIcon: Icons.print,
        onClickBottomLeft: () {
          print("Shopping Cart Clicked");
        },
        onClickBottomRight:  () {
          print("Print Icon Clicked");
        },
        onClickTopLeft:  () {
          print("Photo Icon Clicked");
        },
        onClickTopRight:  () {
          print("Print Icon Clicked");
        },
      ),
    ),
  ),
));

TODO

  • Add more button
  • Add widget test

Feature Requests and Issues

Please file feature requests and bugs at the issue tracker

Contributing

We would love to see you contribute to extended_button. Feel free to send a pull request to add new buttons to the package.

Contributors

A special thanks to all the contributors.


Ayush Bherwani


Pranit Brahmbhatt

About

A flutter package with extended creative button.

License:MIT License


Languages

Language:Dart 93.1%Language:Kotlin 2.7%Language:Swift 2.7%Language:HTML 1.2%Language:Objective-C 0.3%