lottie_loader 0.0.3 copy "lottie_loader: ^0.0.3" to clipboard
lottie_loader: ^0.0.3 copied to clipboard

Flutter Pacakge that can allow you to use lottie animations as loader.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lottie_loader/lottie_loader.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Lottie Loader Example',
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Lottie Loader Example')),
      body: Center(
        child: ElevatedButton(
          onPressed: () async {
            LoaderOverlay.show(
              context,
              lottieAnimationPath: 'assets/Animation - 1734834675750.json',
              isNetwork: false,
              width: 300,
              height: 300,
              overlayOpacity: 0.6,
              overlayColor: Colors.black
            );

            await Future.delayed(const Duration(seconds: 3));

            LoaderOverlay.hide();
          },
          child: const Text('Show Loader'),
        ),
      ),
    );
  }
}
2
likes
150
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Pacakge that can allow you to use lottie animations as loader.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, lottie

More

Packages that depend on lottie_loader