Main

flutter_animate (Package of the Week)

Use the flutter_animate package to quickly add beautiful, customizable, pre-built animations to your Flutter app. Flutter Animate → https://goo.gle/3GxyAww Samples Repo example → https://goo.gle/3KSN1hg This video is also subtitled in Chinese, Indonesian, Japanese, Korean, Portuguese, Spanish, Arabic, Brazilian Portuguese, Russian, and Vietnamese. Get more tips! → https://goo.gle/FlutterPackage Subscribe to Flutter! → https://goo.gle/FlutterYT #PackageOfTheWeek #Widgets #Flutter

Flutter

10 months ago

♪ [开场音乐] ♪ 每周一包 flutter_animate 想要在不处理动画控制器的情况下 为 Flutter 应用程序 快速地添加精美的预制动画吗? 那不妨试试 flutter_animate 要为小部件(widget)添加效果 请用 Animate 小部件 来包装并提供效果列表 就是这样!搞定了! 用速记语法也可达到相同的结果 若不喜欢默认的动画 你可就时间点之类的稍加调整 设置 delay、duration 或 curve 这些函数 flutter_animate 还为 num 类加入实用的扩展方法 让时长更容易设置 动画多有起讫参数 begin 和 end 来控制动画的开始和结束状态 无论是滑动效果 slide 的定位 或是淡入淡出效果(fade)的不透明度 许多动画都为这类特效提供了额外的参数 要依序连接所属效果 请使用扩展方法 then() 它会等待之前的动画效果都跑完后 才会继续执行后续的效果 你也可以将动画添加到小部件的列表中 将小部件包装在 Animate 列表中 或使用扩展方法 animate() 指定间隔参数 interval 来让 Animate 列表中的效
果交错执行 最后,若希望扩展依状态变化反应 请以 target 目标值参数 来指定开始执行动画的确切时间 想深入了解 flutter_animate 以及其他的软件包 请参考 pub.dev ♪ [结尾配乐] ♪

Comments