zoukankan      html  css  js  c++  java
  • 多个过渡动画效果

    代码:

    // //动画实现
    // return FadeTransition(
    // opacity: Tween(begin: 0.0,end: 1.0)//类似于alpha 透明度效果
    // .animate(CurvedAnimation(
    // parent: animation1,//默认就是animation1
    // curve: Curves.fastOutSlowIn//动画曲线 先快后慢 ,快出慢进等
    // )),
    // child: child,//传入子页面
    // );//渐隐渐现


    // //缩放动画
    // return ScaleTransition(
    // scale: Tween(begin: 0.0,end: 1.0).animate(CurvedAnimation(
    // parent: animation1,
    // curve: Curves.fastOutSlowIn
    // )),
    // child: child,//双层效果叠加的用处
    // );

    //旋转加缩放
    // return RotationTransition(//旋转
    // turns: Tween(begin: 0.0,end: 1.0)
    // .animate(CurvedAnimation(
    // parent: animation1,
    // curve: Curves.fastOutSlowIn
    // )),
    // child: ScaleTransition(//缩放---此处child的作用展示出来了
    // scale: Tween(begin: 0.0,end: 1.0).animate(CurvedAnimation(
    // parent: animation1,
    // curve: Curves.fastOutSlowIn
    // )),
    // child: child,//此处不能少
    // ),
    // );
    //左右滑动动画
    return SlideTransition(
    position: Tween<Offset>(begin: Offset(-1.0, 0.0),end: Offset(0.0, 0.0)).animate(CurvedAnimation(parent: animation1,curve: Curves.fastOutSlowIn)),
    child: child,
    );
    总结:

    //过渡动画的其他效果

    1.缩放动画

    ScalTranstion

    2.旋转动画

    RotationTranstion

    3.左右滑动动画

    SliderTranstion   Tween<offset>(begin:offset(x,y),end:xxx)//x,y 从0到1

     

    多个动画效果child 来添加

  • 相关阅读:
    ng-class中的if else判断
    Sass 的使用
    pre 标签的使用
    C++操作 SQL数据库 实例 代码步骤
    自己写的一个操作Mysql的简单的实例
    C++ 链接Mysql 函数介绍
    Mysql 操作命令 详解
    MFC程序开始的执行过程详述
    Java各种日期格式的获取和设置指定日期
    DM8168 OpenCV尝试与评估(编译ARM版OpenCV)
  • 原文地址:https://www.cnblogs.com/pp-pping/p/12180189.html
Copyright © 2011-2022 走看看