当前位置: 首页 > news >正文

企业注册信息查询网站美团网网站建设 费用

企业注册信息查询网站,美团网网站建设 费用,学wordpress要多久,中国万网网站建设服务package#xff1a;simple_animations 导入包到项目中去 可以实现简单的动画#xff0c; 快速实现#xff0c;不需要自己过多的设置 有多种样式可以实现[ ] 功能#xff1a; 简单的用例#xff1a;具体需要详细可以去 pub 链接地址 1. PlayAnimationBuilder PlayAnima… packagesimple_animations 导入包到项目中去 可以实现简单的动画 快速实现不需要自己过多的设置 有多种样式可以实现[ ] 功能 简单的用例具体需要详细可以去 pub 链接地址 1. PlayAnimationBuilder PlayAnimationBuilderdouble(tween: Tween(begin: 100.0, end: 200.0), //数值是100 到00duration: const Duration(seconds: 1), // 动画的时间是1s 完成动画builder: (context, value, _) {return Container(width: value, // 使用tween 的数值height: value,color: Colors.blue,);},onCompleted: () {// 结束的时候做什么操作},onStarted: (){//在开始的时候运行什么做什么操作},)新增child 参数静态的child ,减少资源的浪费其他的build 同样可以这样使用 PlayAnimationBuilderdouble(tween: Tween(begin: 50.0, end: 200.0),duration: const Duration(seconds: 5),child: const Center(child: Text(Hello!)), // pass in static childbuilder: (context, value, child) {return Container(width: value,height: value,color: Colors.green,child: child, // use child inside the animation);},)2.LoopAnimationBuilder 循环动画 该用例是一个正方形旋转360度并且持续的转动 Center(child: LoopAnimationBuilderdouble(tween: Tween(begin: 0.0, end: 2 * pi), // 0° to 360° (2π)duration: const Duration(seconds: 2), // for 2 seconds per iterationbuilder: (context, value, _) {return Transform.rotate(angle: value, // use valuechild: Container(color: Colors.blue, width: 100, height: 100),);},),)3.MirrorAnimationBuilder 镜像动画 MirrorAnimationBuilderdouble(tween:Tween(begin: -100.0, end: 100.0), // x 轴的数值duration: const Duration(seconds: 2),//动画时间curve: Curves.easeInOutSine, // 动画曲线builder: (context, value, child) {return Transform.translate(offset: Offset(value, 0), // use animated value for x-coordinatechild: child,);},child: Container(width: 100,height: 100,color: Colors.green,),)4.CustomAnimationBuilder 自定义动画可以在stl 无状态里面使用 CustomAnimationBuilderdouble(control: Control.mirror,tween: Tween(begin: 100.0, end: 200.0),duration: const Duration(seconds: 2),delay: const Duration(seconds: 1),//延迟1s才开始动画curve: Curves.easeInOut,startPosition: 0.5,animationStatusListener: (status) {//状态的监听可以在这边做一些操作debugPrint(status updated: $status);},builder: (context, value, child) {return Container(width: value,height: value,color: Colors.blue,child: child,);},child: const Center(child: Text(Hello!,style: TextStyle(color: Colors.white, fontSize: 24))),)带控制器 CustomAnimationBuilderdouble(duration: const Duration(seconds: 1),control: control, // bind state variable to parametertween: Tween(begin: -100.0, end: 100.0),builder: (context, value, child) {return Transform.translate(// animation that moves childs from left to rightoffset: Offset(value, 0),child: child,);},child: MaterialButton(// there is a buttoncolor: Colors.yellow,onPressed: () {setState(() {control (control Control.play)? Control.playReverse: Control.play;});}, // clicking button changes animation directionchild: const Text(Swap),),)5.MovieTween 补间动画可并行的动画 可以一个widget 多个动画同时或者不同时的运行 final MovieTween tween MovieTween()..scene(begin: const Duration(milliseconds: 0),end: const Duration(milliseconds: 1000)).tween(width, Tween(begin: 0.0, end: 100.0)) //0-1秒的的 width 的数值..scene(begin: const Duration(milliseconds: 1000),end: const Duration(milliseconds: 1500)).tween(width, Tween(begin: 100.0, end: 200.0)) //1-1。5秒的的 width 的数值..scene(begin: const Duration(milliseconds: 0),duration: const Duration(milliseconds: 2500)).tween(height, Tween(begin: 0.0, end: 200.0)) //0-2.5秒的的 height 的数值..scene(begin: const Duration(milliseconds: 0),duration: const Duration(milliseconds: 3000)) //0-3 秒的的 颜色 的数值.tween(color, ColorTween(begin: Colors.red, end: Colors.blue));PlayAnimationBuilderMovie(tween: tween, // Pass in tweenduration: tween.duration, // Obtain durationbuilder: (context, value, child) {return Container(width: value.get(width), // Get animated valuesheight: value.get(height),color: value.get(color),);},),6.MovieTween 串行的动画补间 简单的意思就是按照设计的动画一个一个执行按照顺序来执行可以设置不同的数值或者是参数来获取然后改变动画 final signaltween MovieTween()..tween(x, Tween(begin: -100.0, end: 100.0),duration: const Duration(seconds: 1)).thenTween(y, Tween(begin: -100.0, end: 100.0),duration: const Duration(seconds: 1)).thenTween(x, Tween(begin: 100.0, end: -100.0),duration: const Duration(seconds: 1)).thenTween(y, Tween(begin: 100.0, end: -100.0),duration: const Duration(seconds: 1));LoopAnimationBuilderMovie(tween: signaltween,builder: (ctx, value, chid) {return Transform.translate(offset: Offset(value.get(x), value.get(y)),child: Container(width: 100,height: 100,color: Colors.green,));},duration: signaltween.duration, ),总的代码 import dart:math;import package:flutter/material.dart; import package:simple_animations/simple_animations.dart;void main() {runApp(const MaterialApp(home: Scaffold(body: MyPage()))); }class MyPage extends StatefulWidget {const MyPage({Key? key}) : super(key: key);overrideStateMyPage createState() _MyPageState(); }class _MyPageState extends StateMyPage {Control control Control.play; // state variablevoid toggleDirection() {// toggle between control instructionssetState(() {control (control Control.play) ? Control.playReverse : Control.play;});}overrideWidget build(BuildContext context) { //电影样式的动画final MovieTween tween MovieTween()..scene(begin: const Duration(milliseconds: 0),end: const Duration(milliseconds: 1000)).tween(width, Tween(begin: 0.0, end: 100.0)) //0-1秒的的 width 的数值..scene(begin: const Duration(milliseconds: 1000),end: const Duration(milliseconds: 1500)).tween(width, Tween(begin: 100.0, end: 200.0)) //1-1。5秒的的 width 的数值..scene(begin: const Duration(milliseconds: 0),duration: const Duration(milliseconds: 2500)).tween(height, Tween(begin: 0.0, end: 200.0)) //0-2.5秒的的 height 的数值..scene(begin: const Duration(milliseconds: 0),duration: const Duration(milliseconds: 3000)) //0-3 秒的的 颜色 的数值.tween(color, ColorTween(begin: Colors.red, end: Colors.blue));final signaltween MovieTween()..tween(x, Tween(begin: -100.0, end: 100.0),duration: const Duration(seconds: 1)).thenTween(y, Tween(begin: -100.0, end: 100.0),duration: const Duration(seconds: 1)).thenTween(x, Tween(begin: 100.0, end: -100.0),duration: const Duration(seconds: 1)).thenTween(y, Tween(begin: 100.0, end: -100.0),duration: const Duration(seconds: 1));return SingleChildScrollView(child: Column(children: [LoopAnimationBuilderMovie(tween: signaltween,builder: (ctx, value, chid) {return Transform.translate(offset: Offset(value.get(x), value.get(y)),child: Container(width: 100,height: 100,color: Colors.green,));},duration: signaltween.duration,),PlayAnimationBuilderMovie(tween: tween, // Pass in tweenduration: tween.duration, // Obtain durationbuilder: (context, value, child) {return Container(width: value.get(width), // Get animated valuesheight: value.get(height),color: value.get(color),);},),PlayAnimationBuilderdouble(tween: Tween(begin: 100.0, end: 200.0), //数值是100 到00duration: const Duration(seconds: 1), // 动画的时间是1s 完成动画builder: (context, value, _) {return Container(width: value, // 使用tween 的数值height: value,color: Colors.blue,);},onCompleted: () {// 结束的时候做什么操作},onStarted: () {//在开始的时候运行什么做什么操作},),MirrorAnimationBuilderColor?(tween:ColorTween(begin: Colors.red, end: Colors.blue), // 颜色的渐变 红色到蓝色duration: const Duration(seconds: 5), // 动画时长5秒builder: (context, value, _) {return Container(color: value, // 使用该数值width: 100,height: 100,);},),//实现一个绿色箱子从左到右从右到走MirrorAnimationBuilderdouble(tween: Tween(begin: -100.0, end: 100.0), // x 轴的数值duration: const Duration(seconds: 2), //动画时间curve: Curves.easeInOutSine, // 动画曲线builder: (context, value, child) {return Transform.translate(offset: Offset(value, 0), // use animated value for x-coordinatechild: child,);},child: Container(width: 100,height: 100,color: Colors.green,),),CustomAnimationBuilderdouble(control: Control.mirror,tween: Tween(begin: 100.0, end: 200.0),duration: const Duration(seconds: 2),delay: const Duration(seconds: 1),curve: Curves.easeInOut,startPosition: 0.5,animationStatusListener: (status) {debugPrint(status updated: $status);},builder: (context, value, child) {return Container(width: value,height: value,color: Colors.blue,child: child,);},child: const Center(child: Text(Hello!,style: TextStyle(color: Colors.white, fontSize: 24))),),CustomAnimationBuilderdouble(duration: const Duration(seconds: 1),control: control, // bind state variable to parametertween: Tween(begin: -100.0, end: 100.0),builder: (context, value, child) {return Transform.translate(// animation that moves childs from left to rightoffset: Offset(value, 0),child: child,);},child: MaterialButton(// there is a buttoncolor: Colors.yellow,onPressed: () {setState(() {control (control Control.play)? Control.playReverse: Control.play;});}, // clicking button changes animation directionchild: const Text(Swap),),)],),);} } 混合多种动画 import dart:math;import package:flutter/material.dart; import package:simple_animations/simple_animations.dart;void main() {runApp(const MaterialApp(home: Scaffold(body: MyPage()))); }class MyPage extends StatefulWidget {const MyPage({Key? key}) : super(key: key);overrideStateMyPage createState() _MyPageState(); }class _MyPageState extends StateMyPage {Control control Control.play; // state variableoverrideWidget build(BuildContext context) {final x MovieTweenPropertydouble();final y MovieTweenPropertydouble();final color MovieTweenPropertyColor();final tween MovieTween()..scene(begin: const Duration(seconds: 0),duration: const Duration(seconds: 1)).tween(x, Tween(begin: -100.0, end: 100.0),curve: Curves.easeInOutSine).tween(color, ColorTween(begin: Colors.red, end: Colors.yellow))..scene(begin: const Duration(seconds: 1),duration: const Duration(seconds: 1)).tween(y, Tween(begin: -100.0, end: 100.0),curve: Curves.easeInOutSine)..scene(begin: const Duration(seconds: 2),duration: const Duration(seconds: 1)).tween(x, Tween(begin: 100.0, end: -100.0),curve: Curves.easeInOutSine)..scene(begin: const Duration(seconds: 1),end: const Duration(seconds: 3)).tween(color, ColorTween(begin: Colors.yellow, end: Colors.blue))..scene(begin: const Duration(seconds: 3),duration: const Duration(seconds: 1)).tween(y, Tween(begin: 100.0, end: -100.0),curve: Curves.easeInOutSine).tween(color, ColorTween(begin: Colors.blue, end: Colors.red));return MaterialApp(home: Scaffold(backgroundColor: Colors.white,body: Center(child: LoopAnimationBuilderMovie(tween: tween, // Pass in tweenduration: tween.duration, // Obtain durationbuilder: (context, value, child) {return Transform.translate(// Get animated offsetoffset: Offset(x.from(value), y.from(value)),child: Container(width: 100,height: 100,color: color.from(value), // Get animated color),);},),),),);} } 同原生的动画混合开发 以下代码实现一个container 的宽高的尺寸变化 class MyPage extends StatefulWidget {const MyPage({Key? key}) : super(key: key);overrideStateMyPage createState() _MyPageState(); }class _MyPageState extends StateMyPage with AnimationMixin {//同原生的混合使用// Control control Control.play; // state variablelate Animationdouble size;overridevoid initState() {super.initState();// controller 不需要重新定义AnimationMixin 里面已经自动定义了个size Tween(begin: 0.0, end: 200.0).animate(controller);controller.play(); //运行}overrideWidget build(BuildContext context) {return MaterialApp(home: Scaffold(backgroundColor: Colors.white,body: Center(child: Container(width: size.value,height: size.value,color: Colors.red,),),),);} } 多个控制器控制一个widget的实现多维度的动画实现 import dart:math;import package:flutter/material.dart; import package:simple_animations/simple_animations.dart;void main() {runApp(const MaterialApp(home: Scaffold(body: MyPage()))); }class MyPage extends StatefulWidget {const MyPage({Key? key}) : super(key: key);overrideStateMyPage createState() _MyPageState(); }class _MyPageState extends StateMyPage with AnimationMixin {//同原生的混合使用late AnimationController widthcontrol; //宽度控制late AnimationController heigthcontrol; //高度控制器late AnimationController colorcontrol; //颜色控制器late Animationdouble width; //宽度控制late Animationdouble heigth; //高度控制late AnimationColor? color; //颜色控制overridevoid initState() { // mirror 镜像widthcontrol createController()..mirror(duration: const Duration(seconds: 5));heigthcontrol createController()..mirror(duration: const Duration(seconds: 3));colorcontrol createController()..mirror(duration: const Duration(milliseconds: 1500));width Tween(begin: 100.0, end: 200.0).animate(widthcontrol);heigth Tween(begin: 100.0, end: 200.0).animate(heigthcontrol);color ColorTween(begin: Colors.green, end: Colors.black).animate(colorcontrol);super.initState();}overrideWidget build(BuildContext context) {return MaterialApp(home: Scaffold(backgroundColor: Colors.white,body: Center(child: Container(width: width.value,height: heigth.value,color: color.value,),),),);} }
http://www.hkea.cn/news/14369535/

相关文章:

  • 邢台手机网站建设公司施工企业在施工过程中发现工程设计图纸存在差错的
  • 微网站建设价格对比高端网站建设 磐石网络专注
  • 中国对外贸易网站有赞微商城登录入口
  • 做网站的时候宽度都怎么弄wordpress 虎嗅 2017
  • 广东省住房和城乡建设厅网站 粤建网足球网站模板
  • 上市公司中 哪家网站做的好建网站方案
  • 天津网站开发ruhe用dw做网站
  • 网站关键词优化排名软件网站导航栏目设计内容依据
  • 广州建网站哪儿济南兴田德润简介网站空间如何升级
  • 长春做网站哪个公司好大连做网站价格
  • 怎样建设网赌网站南京宜电的网站谁做的
  • 网站开发能用udp协议吗wordpress动态菜单
  • 无锡市做网站豫建设标去哪个网站
  • 西宁网站设计制作平面设计师灵感网站
  • 网站开发信息平台项目总结达州seo
  • 自己公司网站维护wordpress底部怎么改
  • 商务网站建设怎样收费广告设计与制作需要学什么软件
  • 中山建网站价格网站建设实验报告总结
  • 谷歌网站推广软件网站漏洞扫描工具
  • 甘肃住房和城乡建设厅网站xss wordpress script
  • 外贸网站友情链接网站开发公司合作协议书
  • 长沙建设网站公司济南网站建设泉诺
  • 网站推广具体内容网站建设优化去哪学
  • 自己做企业网站好做吗免费友情链接
  • 国内个人网站响应式网站如何设计
  • 南宁网站建设优化长沙百度网站推广厂家
  • 网站的布局方式有哪些方面外贸建站教程
  • 泗县做网站珠海网络公司联系方式
  • 魔立方 网站建设舟山市定海区建设规划局网站
  • 公司网站及微信公众号建设意义五百丁简历模板官方网站