flutter_lottie_4basic 0.8.3 copy "flutter_lottie_4basic: ^0.8.3" to clipboard
flutter_lottie_4basic: ^0.8.3 copied to clipboard

Use lottie in flutter to render animations for iOS and Android, support some basic features

example/lib/main.dart

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_lottie_4basic/flutter_lottie_4basic.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  LottieController controller2;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Lottie'),
        ),
        body: Center(
          child: Container(
            width: 150,
            height: 150,
            child: LottieView.fromFile(
              filePath: "animations/newAnimation.json",
              autoPlay: true,
              loop: true,
              reverse: true,
              onViewCreated: onViewCreatedFile,
            ),
          ),
        ),
      ),
    );
  }

  void onViewCreatedFile(LottieController controller) {
    this.controller2 = controller;
  }

  void dispose() {
    super.dispose();
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Use lottie in flutter to render animations for iOS and Android, support some basic features

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_lottie_4basic