【问题标题】:How do I create an animation in After Effects for Flutter?如何在 After Effects for Flutter 中创建动画?
【发布时间】:2021-05-11 15:07:29
【问题描述】:

目前在我工作的公司,他们正在使用 Flutter,在我在 After Effects 中创建动画之前,创建了一个 JSON 并将其发送给开发人员。现在,我需要找到一种让 After Affects 与 FLUTTER 对话的方式。

【问题讨论】:

    标签: flutter flutter-dependencies flutter-web flutter-animation


    【解决方案1】:

    使用lottie 包。将您的 JSON 添加为资产或将其托管在某处。然后你可以按照示例代码(如下所示)来显示它。

    import 'package:flutter/material.dart';
    import 'package:lottie/lottie.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: ListView(
              children: [
                // Load a Lottie file from your assets
                Lottie.asset('assets/LottieLogo1.json'),
    
                // Load a Lottie file from a remote url
                Lottie.network(
                    'https://raw.githubusercontent.com/xvrh/lottie-flutter/master/example/assets/Mobilo/A.json'),
    
                // Load an animation and its images from a zip file
                Lottie.asset('assets/lottiefiles/angel.zip'),
              ],
            ),
          ),
        );
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      • 2021-03-23
      • 2020-04-24
      • 2019-02-21
      • 2021-08-18
      • 1970-01-01
      • 2020-04-11
      相关资源
      最近更新 更多