loading_overlay 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 91

loading_overlay #

A simple widget wrapper to enable modal progress HUD (a modal progress indicator, HUD = Heads Up Display)

A fork of mobile_progress_hud Inspired by this article.

Demo #


See example for details

Usage #

Add the package to your pubspec.yml file.

  loading_overlay: ^0.2.0

Next, import the library into your widget.

import 'package:loading_overlay/loading_overlay.dart';

Now, all you have to do is simply wrap your widget as a child of ModalProgressHUD, typically a form, together with a boolean that is maintained in local state.

bool _saving = false

Widget build(BuildContext context) {
  return Scaffold(
     body: LoadingOverlay(child: Container(
     ), isLoading: _saving),

Options #

The current parameters are customizable in the constructor

    @required this.opacity,
    @required this.isLoading,
    @required this.child,
    this.progressIndicator = const CircularProgressIndicator(),

Update: See this article on Medium about async form validation

See the example application source for a complete sample app using the modal progress HUD. Included in the example is a method for using a form's validators while making async calls (see flutter/issues/9688 for details).

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!



  • Add fading effect
  • Rename to loading_overlay
  • Remove optional offset
  • Rename isInAsyncCall to isLoading


  • Performance optimization
  • Improved docs


  • Added option to dismiss modal
  • Refactored example


  • Added option to position progress indicator
  • Refactored example


  • Added support for Dart 2.0


  • Pass any progress indicator
  • Added tests and code coverage
  • Refactoring for tests


  • Changed layout of README and corrected spelling


  • Updated README


  • Fixed location of demo gif file


  • Added example of use of modal progress hud with login screen, form and async calls.

[0.0.1] - July 10, 2018

  • Simple countainer widget to enable modal progress hud (progress indicator)


example #

Update: see this article on Medium about async form validation

Sample app showing how to use loading_overlay in a login screen that makes calls to a backend. Also shows method to manage form verification with async calls (see flutter/issues/9688 for details).

Demo #


Use this package as a library

1. Depend on it

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

  loading_overlay: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:loading_overlay/loading_overlay.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/loading_overlay.dart.

Run flutter format to format lib/loading_overlay.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies