Overview
In this code snippet we use Lottie library to display cool animation like Netflix using Flutter.
Source Code
import 'package:lottie/lottie.dart';
import 'package:flutter/material.dart';
class LottieAnimation extends StatelessWidget {
const LottieAnimation({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Lottie.network(
'https://assets1.lottiefiles.com/private_files/lf30_is6flrfu.json',
repeat: true,
frameRate: FrameRate(60),
fit: BoxFit.contain,
),
);
}
}
Animation attribution – @brian karungani / LottieFiles