Git Product home page Git Product logo

flutter_demo's Introduction

#目前已经弄好了购物车抛物线动画. 应该是一些配置文件需要注意,否则会出现动画不动的bug. 所以尽量不要随便修改项目中的配置文件!!!!!!!!!!!!!!!!

void main() { runApp(new MyApp()); }

flutter_mall_cart

指定起点、终点(左右均可)和widget A,将A以抛物线的形式从起点运动到终点(在同一水平线上的话,效果啥样我也不清楚了)。

the function is you can give a start and end point(on left or right its compatible,but not in a horzontal line),and provide a widget.ParabolaAnimateWidget will animate the widget that you provide, from start to end point follow a parabola path.

image

INSTALL

dependencies:

add_cart_parabola: ^0.0.5

USAGE

看名字差不多就能知道意思,俺就不多写了,具体可以下载demo,里面更为清楚具体。

this a simple tool :), you can realize through this param's name; and clone this demo see more detail.

// rootkey传根部局的可以, 主要用于定位。

// rootkey is your rootWidget's key,it's help for location.

// callback这个是动画的回调,会带会当前动画的status

// callback is animation's status callback,

// controlRatio 控制点的系数,默认是2(小于1可能会有意想不到的效果)

// controlRatio default value is 2 (if it's smaller than 1, maybe cause some effect that you don't wanna see)

ParabolaAnimateWidget(rootKey,startOffset,endOffset,Icon(Icons.cancel,color: Colors.greenAccent,),callback,);

MORE

如果觉得有啥功能需要加上,可以告诉我,有时间我会加上去(具有通用性的) ,你也可以自己直接修改。

if you have some good thoughts about function, can tell me in there, i will add it soon(it's should be a common functional).

CORNER

向大佬学习,嘿嘿!

image image

flutter_demo's People

Contributors

zhangbo2008 avatar

Watchers

 avatar  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.