easyloading_plus 1.0.2 copy "easyloading_plus: ^1.0.2" to clipboard
easyloading_plus: ^1.0.2 copied to clipboard

A simple and customizable Flutter package for showing loading indicators.

Easy Loading.

A simple and customizable Flutter package for showing loading indicator. It helps developers display smooth and responsive loading overlays with minimal setup and easy-to-use APIs. .

Loading for Flutter


Features #

  • Normal loading overlay with blur effect
  • Customizable CircularProgressIndicator
  • Progress loader with percentage display
  • Easy to show and dismiss

Quickstart #

Add dependency to your pubspec file #

Add this to your pubspec.yaml:

dependencies:
  easyloading_plus: ^1.0.0

Then run:

flutter pub get

Usage #

Show normal loader

EasyLoading.show(context);

Show progress loader

EasyLoading.showProgress(context, 50); // 50% complete

Dismiss loader

EasyLoading.dismiss();

Example #

See example/main.dart for a full working example.

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'EasyLoading Example',
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("EasyLoading Example")),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                EasyLoading.show(context);
                Future.delayed(const Duration(seconds: 3), () {
                  EasyLoading.dismiss();
                });
              },
              child: const Text("Show Loader"),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                double percent = 0;
                EasyLoading.showProgress(context, percent);

                // simulate progress using Timer.periodic
                Timer.periodic(const Duration(milliseconds: 300), (timer) {
                  percent += 10;
                  if (percent > 100) {
                    EasyLoading.dismiss();
                    timer.cancel();
                  } else {
                    EasyLoading.showProgress(context, percent);
                  }
                });
              },
              child: const Text("Show Progress Loader"),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
150
points
47
downloads
screenshot

Publisher

verified publisherprogrammerhasan.com

Weekly Downloads

A simple and customizable Flutter package for showing loading indicators.

Repository (GitHub)
View/report issues

Topics

#flutter #loading #overlay #progress-indicator #easy-loading

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on easyloading_plus