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 来添加

  • 相关阅读:
    编程开发之--单例模式(2)
    编程开发之--单例模式(1)
    oracle 存储过程
    数据结构与算法之--最大公约数、最小公倍数
    编程开发之--Oracle数据库--存储过程使用动态参数绑定(3)
    软件开发之常用的工具
    Oracle PL/SQL学习之你需要知道的快捷键
    Linux下安装Tomcat服务器和部署Web应用
    如何在linux下安装tomcat服务器
    CentOS7 64位安装mysql教程
  • 原文地址:https://www.cnblogs.com/pp-pping/p/12180189.html
Copyright © 2011-2022 走看看