flip 2.0.0 copy "flip: ^2.0.0" to clipboard
flip: ^2.0.0 copied to clipboard

A widget provides flip animation. Normally wrap tow cards to display more information when tap on the front card.

Flip #

翻转效果控件, 可以水平或垂直翻转控件。

  Widget build(BuildContext context){
    return Flip(
      controller:controller,                      //FlipController实例,用来控制翻转动作
      flipDirection: Axis.horizontal,             //或Axis.vertical,水平翻转或垂直翻转
      flipDuration: Duration(milliseconds: 200),  //翻转动画时间,默认值为300毫秒
      firstChild: Container(),                    //正面的控件
      secondChild: Container(),                   //背面的控件
    );
  }
  
  void onAnyAction(){
    controller.isFront = true;  //翻转到正面
    controller.isFront = false; //翻转到背面
    controller.flip();          //翻转到相反面
  }
10
likes
120
pub points
71%
popularity

Publisher

verified publishershupian.xyz

A widget provides flip animation. Normally wrap tow cards to display more information when tap on the front card.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on flip