EP.4 How to Show Animation Like Netflix Splash Screen – The Easy Way

how-to-show-animation-like-netflix-splash-screen-the-easy-way

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

Follow to become a programming expert:

Subscribe to stackedList

Get the latest updates & blog posts right to your inbox

Articles you might like…