License

A Flutter package that provides a simple and customizable loading dialog. Useful for showing progress indicators with optional titles and subtitles during async operations.

Features

  • Multiple loading types (dots, spinner, circular, etc.)
  • Customizable title and subtitle
  • Barrier dismissible option
  • Easy to show and hide programmatically
  • Works on all Flutter-supported platforms (iOS, Android, Web, Desktop)

Getting started

Add the package to your `pubspec.yaml` file:

dependencies:
  loading_dialog_plus: ^0.0.1

  flutter pub get

Usage

Here’s a simple example to show a loading dialog:

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(title: const Text('Loading Dialog Demo')),
        body: Center(
          child: Builder(
            builder: (context) {
              return ElevatedButton(
                onPressed: () async {
                  final loader = LoadingDialog(
                    buildContext: context,
                    barrierDismissible: false,
                    type: LoadingDialogType.dots,
                    title: "Please Wait",
                    subtitle: "Processing your request...",
                  );

                  loader.show();
                  await Future.delayed(const Duration(seconds: 3));
                  loader.hide();
                },
                child: const Text('Show Loading Dialog'),
              );
            },
          ),
        ),
      ),
    );
  }
}

Additional information

  • More information: You can find detailed documentation and examples in the /example folder of this package.
  • Reporting issues: If you encounter bugs or have feature requests, please open an issue on the GitHub repository. Provide a clear description and, if possible, a minimal reproducible example.
  • Response expectations: The package maintainer will review issues and pull requests in a timely manner, aiming to provide guidance or fixes within a few days.
  • License: This package is released under the MIT License (see LICENSE file for details).