Awesome Open Source
Awesome Open Source

Flutter EasyLoading

pub package pub points popularity likes license stars

English | 简体中文

Live Preview



Add this to your package's pubspec.yaml file:

  flutter_easyloading: ^3.0.3


import 'package:flutter_easyloading/flutter_easyloading.dart';

How to use

First, initialize EasyLoading in your MaterialApp/CupertinoApp:

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter EasyLoading',
      theme: ThemeData(
      home: MyHomePage(title: 'Flutter EasyLoading'),
      builder: EasyLoading.init(),

Then, enjoy yourself: 'loading...');

EasyLoading.showProgress(0.3, status: 'downloading...');

EasyLoading.showSuccess('Great Success!');

EasyLoading.showError('Failed with Error');

EasyLoading.showInfo('Useful Information.');



Add loading status callback

EasyLoading.addStatusCallback((status) {
  print('EasyLoading Status $status');

Remove loading status callback(s)





  • textColorindicatorColorprogressColorbackgroundColor only used for EasyLoadingStyle.custom.

  • maskColor only used for EasyLoadingMaskType.custom.

/// loading style, default [EasyLoadingStyle.dark].
EasyLoadingStyle loadingStyle;

/// loading indicator type, default [EasyLoadingIndicatorType.fadingCircle].
EasyLoadingIndicatorType indicatorType;

/// loading mask type, default [EasyLoadingMaskType.none].
EasyLoadingMaskType maskType;

/// toast position, default [].
EasyLoadingToastPosition toastPosition;

/// loading animationStyle, default [EasyLoadingAnimationStyle.opacity].
EasyLoadingAnimationStyle animationStyle;

/// loading custom animation, default null.
EasyLoadingAnimation customAnimation;

/// textAlign of status, default [].
TextAlign textAlign;

/// textStyle of status, default null.
TextStyle textStyle;

/// content padding of loading.
EdgeInsets contentPadding;

/// padding of [status].
EdgeInsets textPadding;

/// size of indicator, default 40.0.
double indicatorSize;

/// radius of loading, default 5.0.
double radius;

/// fontSize of loading, default 15.0.
double fontSize;

/// width of progress indicator, default 2.0.
double progressWidth;

/// width of indicator, default 4.0, only used for [EasyLoadingIndicatorType.ring, EasyLoadingIndicatorType.dualRing].
double lineWidth;

/// display duration of [showSuccess] [showError] [showInfo], default 2000ms.
Duration displayDuration;

/// animation duration of indicator, default 200ms.
Duration animationDuration;

/// color of loading status, only used for [EasyLoadingStyle.custom].
Color textColor;

/// color of loading indicator, only used for [EasyLoadingStyle.custom].
Color indicatorColor;

/// progress color of loading, only used for [EasyLoadingStyle.custom].
Color progressColor;

/// background color of loading, only used for [EasyLoadingStyle.custom].
Color backgroundColor;

/// mask color of loading, only used for [EasyLoadingMaskType.custom].
Color maskColor;

/// should allow user interactions while loading is displayed.
bool userInteractions;

/// should dismiss on user tap.
bool dismissOnTap;

/// indicator widget of loading
Widget indicatorWidget;

/// success widget of loading
Widget successWidget;

/// error widget of loading
Widget errorWidget;

/// info widget of loading
Widget infoWidget;

Because of EasyLoading is a singleton, so you can custom loading style any where like this:

  ..displayDuration = const Duration(milliseconds: 2000)
  ..indicatorType = EasyLoadingIndicatorType.fadingCircle
  ..loadingStyle = EasyLoadingStyle.dark
  ..indicatorSize = 45.0
  ..radius = 10.0
  ..progressColor = Colors.yellow
  ..backgroundColor =
  ..indicatorColor = Colors.yellow
  ..textColor = Colors.yellow
  ..maskColor =
  ..userInteractions = true
  ..dismissOnTap = false
  ..customAnimation = CustomAnimation();

More indicatorType can see in 👉 flutter_spinkit showcase

Custom Animation

example: 👉 Custom Animation


  • [x] add progress indicator

  • [x] add custom animation




MIT License


Thanks to flutter_spinkit ❤️

Supported by JetBrains Open Source

Alternatives To Flutter_easyloading
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Dart (52,431
Flutter (30,270
Loading (17,398
Toast (2,133
Flutter Plugin (982
Dartlang (768
Flutter Package (717
Flutter Widgets (432
Spinkit (164
Custom Animation (8
Flutter Toast (7