相关疑难解决方法(0)

Flutter 3D 立方体效果

我问你如何在 Flutter 中创建这种效果?

在此处输入图片说明

animation cube dart flutter

3
推荐指数
1
解决办法
2650
查看次数

如何使用Flutter AnimationController和Transform旋转图像?

我有星星png图像,我需要使用Flutter AnimationController和Transformer旋转星星。我找不到图像旋转动画的任何文档或示例。

任何想法如何使用Flutter AnimationController和Transform旋转图像?

更新:

class _MyHomePageState extends State<MyHomePage>  with TickerProviderStateMixin {

  AnimationController animationController;

  @override
  void initState() {
    super.initState();
    animationController = new AnimationController(
      vsync: this,
      duration: new Duration(milliseconds: 5000),
    );
    animationController.forward();
    animationController.addListener(() {
      setState(() {
        if (animationController.status == AnimationStatus.completed) {
          animationController.repeat();
        }
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Container(
      alignment: Alignment.center,
      color: Colors.white,
      child: new AnimatedBuilder(
        animation: animationController,
        child: new Container(
          height: 80.0,
          width: 80.0,
          child: new Image.asset('images/StarLogo.png'),
        ),
        builder: (BuildContext context, Widget _widget) {
          return …
Run Code Online (Sandbox Code Playgroud)

animation image transform flutter

1
推荐指数
4
解决办法
6505
查看次数

标签 统计

animation ×2

flutter ×2

cube ×1

dart ×1

image ×1

transform ×1