Giter Site home page Giter Site logo

hucancode / water_bottle Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 15.48 MB

A beautiful water bottle for your Flutter project

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

License: MIT License

Kotlin 0.26% Swift 0.82% Objective-C 0.08% Dart 91.31% HTML 7.53%

water_bottle's Introduction

Water Bottle

Features

This library add a bottle widget to your screen. You can use it as a loading indicator, a progress tracker, or any kind of measurement suits your needs.

Plain Sphere Triangle

Sphere bottle get reduced to a ball when aspect ratio smaller than 1

Responsive Sphere

Usage

To use this library, add water_bottle as a dependency in your pubspec.yaml file.

Import it where you need

import 'package:water_bottle/water_bottle.dart';

Build bottle widget

final plainBottleRef = GlobalKey<WaterBottleState>();
WaterBottle(
    key: plainBottleRef, 
    waterColor: Colors.blue, 
    bottleColor: Colors.lightBlue,
    capColor: Colors.blueGrey
)

Update widget

plainBottleRef.currentState?.waterLevel = 0.5;// 0.0~1.0

For more please refer /example folder

Additional information

For more information, or contribution, please refer to the original github

water_bottle's People

Contributors

hucancode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kz0327r

water_bottle's Issues

Sphere bottle

Hello! Thanks for making the code available. I would like to know how to turn the ampoule into a ball as shown in the example, I've tried here and I can't!

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.