Search packages, repositories and app categories

load cover
Package detailsv1.0.0

load

Global loading widget, Pure flutter library, not use native code. It is similar to OKToast in use.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.9K
Likes
22
Pub points
130

Install package

flutter pub add load

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A lightweight, pure Flutter loading widget package that provides a global loading indicator without relying on native code. Inspired by OKToast in usage, it offers a simple and consistent way to display loading states across apps. Compatible with all major platforms including Android, iOS, Web, macOS, Windows, and Linux. Ideal for developers seeking a straightforward solution to manage UI-level loading indicators during async operations.

Use cases

  • Displaying loading overlays during API calls
  • Showing progress during data fetching
  • Enhancing user feedback during long-running tasks
  • Providing a consistent loading experience across platforms
  • Replacing manual loading widgets with a global solution

Key features

  • Global loading control
  • Pure Dart implementation
  • Cross-platform support
  • Simple API similar to OKToast
  • No native code dependencies

Suitable for

  • Developers building cross-platform Flutter apps
  • Teams needing consistent loading UX
  • Projects avoiding native platform integrations
  • Apps requiring minimal setup for loading indicators
  • UI-focused applications with frequent async operations

Considerations

  • May require manual dismissal if not handled properly
  • Limited customization compared to advanced toast libraries
  • Not suitable for complex loading animations or nested loading states

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

load

pub package GitHub

Global loading widget, which can be used through simple configuration.

Pure flutter library, not use native code.

It is similar to OKToast in use.

ScreenShot

Screenshot_2019-05-21-14-08-42-731_com.example.ex.png

Usage

  • install

Add to yaml

version is pub package

dependencies:
  load: $latest_version
  • import
import 'package:load/load.dart';
  • wrap your application
void main() {
  runApp(
    LoadingProvider(
      child: MyApp(),
    ),
  );
}

or

LoadingProvider(
  child: MaterialApp(),
);

Debug custom loading widget in Flutter inspector

You can try to use next method to include the widget:

MaterialApp(
  builder: (context, widget) {
    return LoadingProvider(
      child: widget,
    );
  },
);

see example/lib/main.dart

  • show or hide dialog
showLoadingDialog();
showCustomLoadingWidget(Container()); // custom dialog
hideLoadingDialog();

Advanced Usage

Custom Loading Widget

Using LoadingThemeData and loadingWidgetBuilder

LoadingProvider(
  themeData: LoadingThemeData(),
  loadingWidgetBuilder: (ctx, data) {
    return Center(
      child: SizedBox(
        width: 30,
        height: 30,
        child: Container(
          child: CupertinoActivityIndicator(),
          color: Colors.blue,
        ),
      ),
    );
  },
  child: MyApp(),
);

image

Custom some config

All params is optional

Params Type Default Value Desc
backgroundColor Color Colors.black54 Background transparent mask
tapDismiss bool true Will it close when touching the background?
loadingBackgroundColor Color Colors.white Background color for the center Loading Widget
loadingPadding EdgeInsets EdgeInsets.all(8.0) Padding for the center Loading Widget
loadingSize Size Size(55,55) Size for the center Loading Widget
animDuration Duration Duration(milliseconds: 300) Show/Hide Time Duration

Categories

Source repository

Projects using this package

No data available yet.