GithubHelp home page GithubHelp logo

skquark / liquid_button Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamsahdeep/liquid_button

0.0 1.0 0.0 2.45 MB

Liquify your buttons, web demo at website

Home Page: https://iamsahdeep.github.io/liquid_button/#/

License: Apache License 2.0

Kotlin 9.27% Swift 3.13% Objective-C 2.43% Dart 78.16% HTML 3.99% Ruby 3.02%

liquid_button's Introduction


Logo Liquid Button

Pub

Hi, Introducing Liquid Button for Flutter. It supports Web and Mobile, not tested on Ios. Inspired by Liquid Button in JS.

Preview

Live Demo

Download sample apk as shown in example from releases.

Get it from Github Releases

Experience Live Demo on (not on mobile) : https://iamsahdeep.github.io/liquid_button/#/

Getting Started

  • Add this to your pubspec.yaml

    dependencies:
    liquid_button: 1.0.0
    
    
  • Get the package from Pub:

    flutter packages get
    
  • Import it in your file

    import 'package:liquid_button/liquid_button.dart';
    

Example

  • Look for complete example in example folder.
  • Remember to wrap it with GestureDetector or InkWell, might include in next version.
                LiquidButton(
                  expandFactor: 20,
                  backgroundColor: Colors.black87,
                  height: 100,
                  child: Text(
                    "Liquid Button",
                    style: TextStyle(
                        fontSize: 30,
                        color: Colors.white,
                        fontWeight: FontWeight.bold),
                  ),
                  gradientColor: Colors.black54,
                  width: 400,
                ),

Attributes

Currently we have 3 buttons : RoundClothButton(poor naming :p), ClothButton and LiquidButton. Here are some of the attributes in which height,width and background color is the required. Rest can be left to have default values.

  • expandFactor : (double) Allows you to decide Expansion of the button while animating. Should be less than 50.
  • backgroundColor : (Color) Color of the button.
  • gradientColor : (Color) If you want gradient effect onHover, if not given no color effect will be there.
  • retainGradient : (bool) If you want to retain the gradient effect when mouse leaves the button area. Default is false.
  • gap : (int) Integer to provide gap between subsequent point while painting the line. Do experiment with it, Should not be greater that height/2.

Known Issues

  • Lag on Web - It generally happens when we are using multiple Liquid Buttons on same screen due to usage of MouseRegion.You might experience the same on the live demo also. Check this issue flutter/flutter#41194
  • Gesture not working on Web on Mobile - Need to work on it..
  • Note : Please report any kind of bugs you are experiencing.

Author & support

This project is created by Sahdeep Singh but with lots of support and help.

If you appreciate my work, consider buying me a cup of โ˜• to keep me recharged ๐Ÿค˜

Or you can also endorse me on LinkedIn to keep me motivated.

I love my work and I'm available for freelance work. Contact me on my email: [email protected]

liquid_button's People

Contributors

iamsahdeep avatar skquark avatar

Watchers

 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.